GD32F403xx User Manual
470
This bit is set when receive buffer is not empty, which means that one data is received and
stored in the receive buffer, and software can read the data by reading the SPI_DATA register.
◼
SPI Transmitting On-Going flag (TRANS)
TRANS is a status flag to indicate whether the transfer is on-going or not. It is set and cleared
by internal hardware and not controlled by software. This flag doesn’t generate any interrupt.
Error conditions
◼
Configuration Fault Error (CONFERR)
CONFERR is an error flag in master mode. In NSS hardware mode and the NSSDRV is not
enabled, the CONFERR is set when the NSS pin is pulled low. In NSS software mode, the
CONFERR is set when the SWNSS bit is 0. When the CONFERR is set, the SPIEN bit and
the MSTMOD bit are cleared by hardware, the SPI is disabled and the device is forced into
slave mode.
The SPIEN and MSTMOD bit are write protection until the CONFERR is cleared. The
CONFERR bit of the slave cannot be set. In a multi-master configuration, the device can be
in slave mode with CONFERR bit set, which means there might have been a multi-master
conflict for system control.
◼
Rx Overrun Error (RXORERR)
The RXORERR bit is set if a data is received when the RBNE is set. That means, the last
data has not been read out and the newly incoming data is received. The receive buffer
contents won’t be covered with the newly incoming data, so the newly incoming data is lost.
◼
Format Error (FERR)
In slave TI mode, the slave also monitors the NSS signal and set an error flag if it detects an
incorrect NSS behavior, for example: toggles at the middle bit of a byte.
◼
CRC Error (CRCERR)
When the CRCEN bit is set, the CRC value received in the SPI_RCRC register will be
compared with the CRC value received immediately after the last frame of data. The CRCERR
will set when they are different.
Table 19-6. SPI interrupt requests
Flag
Description
Clear Method
Interrupt
Enable bit
TBE
Transmit buffer empty
Write SPI_DATA register.
TBEIE
RBNE
Receive buffer not empty
Read SPI_DATA register
RBNEIE
CONFERR
Configuration Fault Error
Read or write SPI_STAT
register, then write SPI_CTL0
register.
ERRIE
RXORERR
Rx Overrun Error
Read SPI_DATA register, then
read SPI_STAT register.