SPI0_S field descriptions
Field Description
7
SPRF
SPI read buffer full flag
SPRF is set at the completion of an SPI transfer to indicate that received data may be read from the SPI
data (D) register. When the receive DMA request is disabled (RXDMAE is 0), SPRF is cleared by reading
SPRF while it is set and then reading the SPI data register. When the receive DMA request is enabled
(RXDMAE is 1), SPRF is automatically cleared when the DMA transfer for the receive DMA request is
completed (RX DMA Done is asserted).
0 No data available in the receive data buffer
1
Data available in the receive data buffer
6
SPMF
SPI match flag
SPMF is set after SPRF is 1 when the value in the receive data buffer matches the value in the M register.
To clear the flag, read SPMF when it is set and then write a 1 to it.
0 Value in the receive data buffer does not match the value in the M register
1 Value in the receive data buffer matches the value in the M register
5
SPTEF
SPI transmit buffer empty flag
This bit is set when the transmit data buffer is empty. When the transmit DMA request is disabled
(TXDMAE is 0), SPTEF is cleared by reading the S register with SPTEF set and then writing a data value
to the transmit buffer at D. The S register must be read with SPTEF set to 1 before writing data to the D
register; otherwise, the D write is ignored. When the transmit DMA request is enabled (TXDMAE is 1),
SPTEF is automatically cleared when the DMA transfer for the transmit DMA request is completed (TX
DMA Done is asserted). SPTEF is automatically set when all data from the transmit buffer transfers into
the transmit shift register. For an idle SPI, data written to D is transferred to the shifter almost immediately
so that SPTEF is set within two bus cycles, allowing a second set of data to be queued into the transmit
buffer. After completion of the transfer of the data in the shift register, the queued data from the transmit
buffer automatically moves to the shifter, and SPTEF is set to indicate that room exists for new data in the
transmit buffer. If no new data is waiting in the transmit buffer, SPTEF simply remains set and no data
moves from the buffer to the shifter.
If a transfer does not stop, the last data that was transmitted is sent out again.
0 SPI transmit buffer not empty
1
SPI transmit buffer empty
4
MODF
Master mode fault flag
MODF is set if the SPI is configured as a master and the slave select input goes low, indicating some
other SPI device is also configured as a master. The SS pin acts as a mode fault error input only when
MSTR is 1, MODFEN is 1, and SSOE is 0; otherwise, MODF will never be set. MODF is cleared by
reading MODF while it is 1 and then writing to the SPI control register 1 (C1).
0 No mode fault error
1 Mode fault error detected
3–0
Reserved
This field is reserved.
This read-only field is reserved and always has the value 0.
Memory Map and Register Descriptions
KL25 Sub-Family Reference Manual, Rev. 3, September 2012
666 Freescale Semiconductor, Inc.