Serial peripheral interface (SPI)
RM0090
890/1731
DocID018909 Rev 11
CRC error
This flag is used to verify the validity of the value received when the CRCEN bit in the
SPI_CR1 register is set. The CRCERR flag in the SPI_SR register is set if the value
received in the shift register does not match the receiver SPI_RXCRCR value.
TI mode frame format error
A TI mode frame format error is detected when an NSS pulse occurs during an ongoing
communication when the SPI is acting in slave mode and configured to conform to the TI
mode protocol. When this error occurs, the FRE flag is set in the SPI_SR register. The SPI
is not disabled when an error occurs, the NSS pulse is ignored, and the SPI waits for the
next NSS pulse before starting a new transfer. The data may be corrupted since the error
detection may result in the lost of two data bytes.
The FRE flag is cleared when SPI_SR register is read. If the bit ERRIE is set, an interrupt is
generated on the NSS error detection. In this case, the SPI should be disabled because
data consistency is no more guaranteed and communications should be reinitiated by the
master when the slave SPI is re-enabled.
Figure 261. TI mode frame format error detection
28.3.11 SPI
interrupts
AI
-3").
-/3)
INPUT
.33
OUTPUT
3#+
OUTPUT
TRIGGER
SAMPLING TRIGGER SAMPLING TRIGGER
SAMPLING
$/.4#!2%
-)3/
OUTPUT
OR
-3"/54
,3"/54
-3").
,3").
-3"/54
,3"/54
TRIGGER
SAMPLING TRIGGER SAMPLING TRIGGER
SAMPLING TRIGGER
SAMPLING
,3").
$/.4#!2%
4)&2&%
Table 125. SPI interrupt requests
Interrupt event
Event flag
Enable Control bit
Transmit buffer empty flag
TXE
TXEIE
Receive buffer not empty flag
RXNE
RXNEIE
Master Mode fault event
MODF
ERRIE
Overrun error
OVR
CRC error flag
CRCERR
TI frame format error
FRE
ERRIE