DRAFT
DRAFT DRAFT DR
DRAFT DRAFT DRAFT
D
RAF
DRAFT DRAFT DRA
FT D
RAFT DR
AFT D
DRA
FT DRAFT DRAFT
D
RAFT
DRAFT
D
RAFT
DRA
UM10601
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
Preliminary user manual
Rev. 1.0 — 7 November 2012
206 of 313
17.1 How to read this chapter
SPI0 is available on all parts. SPI1 is available on parts LPC812M101FDH16 and
LPC812M101FDH20 only.
17.2 Features
•
Data frames 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, for instance.
•
Control information can optionally be written along with data. This allows very
versatile operation, including “any length” frames.
•
One Slave Select input/output with selectable polarity and flexible usage.
Remark:
Texas Instruments SSI and National Microwire modes are not supported.
17.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
17.3.1 Configure the SPIs for wake-up
The SPI can wake up the system from sleep mode in master or slave mode.
UM10601
Chapter 17: LPC800 SPI0/1
Rev. 1.0 — 7 November 2012
Preliminary user manual
Fig 26. SPI clocking
&ORFNGLYLGHU
'LY9DO
63,UDWH
FORFN
63,
6<6&21
V\VWHPFORFN
6<6$+%&/.&75/>@
63,FORFNHQDEOH
63,B3&/.