UM10850
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 2.4 — 13 September 2016
280 of 464
22.1 How to read this chapter
SPI0 and SPI1 are available on all parts.
22.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.
•
FIFO support from the System FIFO, see
for details.
Remark:
Texas Instruments SSI and National Microwire modes are not supported.
22.3 Basic configuration
If using the SPIs with FIFO support, configure the FIFOs, see
Configure SPI0/1 using the following registers:
•
In the ASYNCAPBCLKCTRL register, set bit 9 / 10 (
) to enable the clock to
the register interface.
•
Clear the SPI0/1 peripheral resets using the ASYNCPRESETCTRL register
(
).
•
Enable/disable the SPI0/1 interrupts in interrupt slots #24 / 25 in the NVIC.
•
Configure the SPI0/1 pin functions through IOCON. See
.
•
The peripheral clock for both SPIs is the asynchronous APB clock (see
).
•
Set
the
RXIGNORE
bit
to
only
transmit
data
and
not
read
the
incoming
data.
Otherwise,
the
transmit
halts
when
the
receiver
buffer
is
full.
22.3.1 Configure the SPI for wake-up
In sleep mode, any signal that triggers an SPI interrupt can wake up the part, provided
that the interrupt is enabled in the INTENSET register and the NVIC. As long as the SPI
clock SPI_PCLK remains active in sleep mode, the SPI can wake up the part
independently of whether the SPI block is configured in master or slave mode.
UM10850
Chapter 22: LPC5410x Serial Peripheral Interfaces (SPI0/1)
Rev. 2.4 — 13 September 2016
User manual