![NXP Semiconductors LPC43Sxx Скачать руководство пользователя страница 1196](http://html1.mh-extra.com/html/nxp-semiconductors/lpc43sxx/lpc43sxx_user-manual_17218271196.webp)
UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2015. All rights reserved.
User manual
Rev. 2.1 — 10 December 2015
1196 of 1441
NXP Semiconductors
UM10503
Chapter 43: LPC43xx/LPC43Sxx SPI
The data and clock phase relationships are summarized in
The definition of when a transfer starts and stops is dependent on whether a device is a
master or a slave, and the setting of the CPHA variable.
When a device is a master, the start of a transfer is indicated by the master having a byte
of data that is ready to be transmitted. At this point, the master can activate the clock, and
begin the transfer. The transfer ends when the last clock cycle of the transfer is complete.
When a device is a slave and CPHA is set to 0, the transfer starts when the SSEL signal
goes active, and ends when SSEL goes inactive. When a device is a slave, and CPHA is
set to 1, the transfer starts on the first clock edge when the slave is selected, and ends on
the last clock edge where data is sampled.
Fig 144. SPI data transfer format (CPHA = 0 and CPHA = 1)
MISO (CPHA = 1)
MOSI (CPHA = 1)
Cycle # CPHA = 1
CPHA = 1
MISO (CPHA = 0)
MOSI (CPHA = 0)
Cycle # CPHA = 0
CPHA = 0
SSEL
SCK (CPOL = 1)
SCK (CPOL = 0)
1
2
3
8
7
6
5
4
BIT 1
BIT 2
BIT 3
BIT 8
BIT 7
BIT 6
BIT 5
BIT 4
BIT 1
BIT 2
BIT 3
BIT 8
BIT 7
BIT 6
BIT 5
BIT 4
1
2
3
8
7
6
5
4
BIT 1
BIT 2
BIT 3
BIT 8
BIT 7
BIT 6
BIT 5
BIT 4
BIT 1
BIT 2
BIT 3
BIT 8
BIT 7
BIT 6
BIT 5
BIT 4
Table 996. SPI Data To Clock Phase Relationship
CPOL and CPHA
settings
When the first data bit is
driven
When all other data
bits are driven
When data is
sampled
CPOL = 0, CPHA = 0
Prior to first SCK rising edge
SCK falling edge
SCK rising edge
CPOL = 0, CPHA = 1
First SCK rising edge
SCK rising edge
SCK falling edge
CPOL = 1, CPHA = 0
Prior to first SCK falling edge
SCK rising edge
SCK falling edge
CPOL = 1, CPHA = 1
First SCK falling edge
SCK falling edge
SCK rising edge