
UM10800
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2016. All rights reserved.
User manual
Rev. 1.2 — 5 October 2016
207 of 487
14.1 How to read this chapter
The SPI interfaces are available on all parts depending on the switch matrix configuration.
14.2 Features
•
Data transmits of 1 to 16 bits supported directly. Larger frames supported by software.
•
Master and slave operation.
•
Data can be transmitted to a slave without the need to read incoming data. This can
be useful while setting up an SPI memory.
•
Control information can optionally be written along with data. This allows very
versatile operation, including frames of arbitrary length.
•
Up to four Slave Select input/outputs with selectable polarity and flexible usage.
•
Supports DMA transfers: SPIn transmit and receive functions can operated with the
system DMA controller.
Remark:
Texas Instruments SSI and National Microwire modes are not supported.
14.3 Basic configuration
Configure SPI0/1 using the following registers:
•
In the SYSAHBCLKCTRL register, set bit 11 and 12 (
) to enable the clock to
the register interface.
•
Clear the SPI0/1 peripheral resets using the PRESETCTRL register (
•
Enable/disable the SPI0/1 interrupts in interrupt slots #0 and 1 in the NVIC.
•
Configure the SPI0/1 pin functions through the switch matrix. See
•
The peripheral clock for both SPIs is the system clock (see
UM10800
Chapter 14: LPC82x SPI0/1
Rev. 1.2 — 5 October 2016
User manual
Fig 23. SPI clocking
Clock divider
DIVVAL
SPI rate
clock
SPI0/1
SYSCON
system clock
SYSAHBCLKCTRL[11:12]
(SPI0/1 clock enable)
SPIn_PCLK
SPIn_SCK
(master mode)
SPIn_SCK
(slave mode)