GD32F20x User Manual
556
This bit is set when the transmit buffer is empty, the software can write the next data to the
transmit buffer by writing the SPI_DATA register.
Receive buffer not empty flag (RBNE)
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.
21.6.2.
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 contents of the
receive buffer are not covered by the newly incoming data, so the newly incoming data is
missing.
CRC Error (CRCERR)
When the CRCEN bit is set, the CRC calculation result of the received data in the SPI_RCRC
register is compared with the received CRC value after the last data, the CRCERR is set
when they are different.
Table 21-4. 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
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...