Registers
1448
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Serial Peripheral Interface (SPI)
Table 29-13. SPI Flag Register (SPIFLG) Field Descriptions (continued)
Bit
Field
Value
Description
5
Reserved
0
Reads return zero and writes have no effect.
4
BITERRFLG
This bit is set when a mismatch of internal transmit data and transmitted data is detected. The SPI
samples the signal of the transmit pin (master: SPIx_SIMO, slave: SPIx_SOMI) at the receive point
(half clock cycle after transmit point). If the sampled value differs from the transmitted value a bit
error is detected and the flag is set. A possible reason for a bit error can be a too high bit
rate/capacitive load or another master/slave trying to transmit at the same time. This flag can be
cleared by one of the following ways:
• Write a 1 to this bit.
• Set SPIGCR1.ENABLE bit to 0.
0
No bit error occurred.
1
A bit error occurred.
3
DESYNCFLG
Desynchronization of slave device. Desynchronization monitor is active in master mode only. The
master monitors the SPIx_ENA signal coming from the slave device and sets the DESYNCFLG bit
if the SPIx_ENA signal is not deasserted after the last bit is transmitted plus t
T2EDELAY
.
Desynchronization can occur if a slave device misses a clock edge coming from the master. This
flag can be cleared by one of the following ways:
• Write a 1 to this bit.
• Set SPIGCR1.ENABLE bit to 0.
0
No slave desynchronization detected.
1
Slave is desynchronized
Note:
Inconsistency of DESYNCFLG in SPI. Due to the nature of this error, under some
circumstances it is possible for a desynchronized error detected for the previous buffer to be visible
in the current buffer. This is due to the fact that receive completion flag/interrupt will be generated
when the buffer transfer is completed. But decence will be detected after the buffer transfer is
completed. So, if CPU/DMA reads the received data quickly when an receive interrupt is detected,
then the status flag may not reflect the correct decence condition.
2
PARERRFLG
Calculated parity differs from received parity bit. If the parity generator is enabled an even or odd
parity bit is added at the end of a data word . During reception of the data word the parity generator
calculates the reference parity and compares it to the received parity bit. In the event of a mismatch
the PARERRFLG flag is set. This flag can be cleared by one of the following ways:
• Write a 1 to this bit.
• Set SPIGCR1.ENABLE bit to 0.
0
No parity error detected.
1
A parity error occurred.
1
TIMEOUTFLG
Time-out due to non-activation of SPIx_ENA signal. This flag is applicable only for the master
mode. The SPI generates a time-out because the slave hasn't responded in time by activating the
SPIx_ENA signal after the chip select signal has been activated. If a time-out condition is detected
the corresponding chip select is deactivated immediately and the TIMEOUTFLG flag is set. This
flag can be cleared by one of the following ways:
• Write a 1 to this bit.
• Set SPIGCR1.ENABLE bit to 0.
0
No SPIx_ENA signal time-out occurred.
1
An SPIx_ENA signal time-out occurred.
0
DLENERRFLG
Data length error flag. This flag can be cleared by one of the following ways:
• Write a 1 to this bit.
• Set SPIGCR1.ENABLE bit to 0.
0
No data length error has occurred.
1
A data length error has occurred.