![NXP Semiconductors MKL27Z128VFM4 Reference Manual Download Page 591](http://html1.mh-extra.com/html/nxp-semiconductors/mkl27z128vfm4/mkl27z128vfm4_reference-manual_1721847591.webp)
If C1[CPHA] is set, even numbered edges on the SPSCK input cause the data at the serial
data input pin to be latched. Odd numbered edges cause the value previously latched
from the serial data input pin to shift into the LSB or MSB of the SPI shift register,
depending on C1[LSBFE].
When C1[CPHA] is set, the first edge is used to get the first data bit onto the serial data
output pin. When C1[CPHA] is clear and the SS input is low (slave selected), the first bit
of the SPI data is driven out of the serial data output pin. After the eighth (SPIMODE =
0) or sixteenth (SPIMODE = 1) shift, the transfer is considered complete and the received
data is transferred into the SPI Data register. To indicate transfer is complete, the SPRF
flag in the SPI Status Register is set.
Note
A change of the bits FIFOMODE,SPIMODE, C2[BIDIROE]
with C2[SPC0] set, C1[CPOL], C1[CPHA], C1[SSOE],
C1[LSBFE], C2[MODFEN], and C2[SPC0] in slave mode will
corrupt a transmission in progress and must be avoided.
35.5.4 SPI FIFO Mode
When the FIFO feature is supported: The SPI works in FIFO mode when the
C3[FIFOMODE] bit is set. When the module is in FIFO mode, the SPI RX buffer and
SPI TX buffer are replaced by an 8-byte-deep FIFO, as the following figures show.
SPI Data Register
IPBus (ips_rdata[7:0])
Read Access
SPI_REG_BLOCK
FIFO Ctrlr
SPI_CORE_SHFR
FIFO depth = 8 bytes
Load
Control
RX- FIFO
shfr_rx_reg
spidh:l_rx_reg
Figure 35-4. SPIH:L read side structural overview in FIFO mode
Chapter 35 Serial Peripheral Interface (SPI)
KL27 Sub-Family Reference Manual , Rev. 5, 01/2016
Freescale Semiconductor, Inc.
591