
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
222 of 487
NXP Semiconductors
UM10800
Chapter 14: LPC82x SPI0/1
14.7 Functional description
14.7.1 Operating modes: clock and phase selection
SPI interfaces typically allow configuration of clock phase and polarity. These are
sometimes referred to as numbered SPI modes, as described in
and shown in
. CPOL and CPHA are configured by bits in the CFG register (
).
Table 201. SPI mode summary
CPOL CPHA SPI
Mode
Description
SCK rest
state
SCK data
change edge
SCK data
sample edge
0
0
0
The SPI captures serial data on the first clock transition of
the transfer (when the clock changes away from the rest
state). Data is changed on the following edge.
low
falling
rising
0
1
1
The SPI changes serial data on the first clock transition of
the transfer (when the clock changes away from the rest
state). Data is captured on the following edge.
low
rising
falling
1
0
2
Same as mode 0 with SCK inverted.
high
rising
falling
1
1
3
Same as mode 1 with SCK inverted.
high
falling
rising
Fig 25. Basic SPI operating modes
CPHA = 1
MSB
LSB
MSB
LSB
CPHA = 0
MISO
MOSI
SSEL
MSB
LSB
MSB
LSB
MISO
MOSI
SSEL
Mode 0 (CPOL = 0) SCK
Mode 2 (CPOL = 1) SCK
Mode 1 (CPOL = 0) SCK
Mode 3 (CPOL = 1) SCK
Data frame
Data frame