GD32F10x User Manual
492
Note:
When SPI is in slave mode and CRC function is enable, the CRC calculator is sensitive
to input SCK clock whether SPI is enable or not. The software must enable CRC only when
the clock is stable to avoid wrong CRC calculation. And when SPI works as a slave, the NSS
internal signal needs to be kept low between the data phase and CRC phase.
18.3.8.
SPI interrupts
Status flags
Transmission buffer empty flag (TBE)
This bit is set when the transmission buffer is empty, the software can write the next data to
the transmission buffer by writing the SPI_DATA register.
Reception buffer not empty flag (RBNE)
This bit is set when reception buffer is not empty, which means that one data is received and
stored in the reception 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 hardware and not controlled by software. This flag
doesn’t generate any interrupt.
Note:
TRANS is set after the first bit is transmitted. So TBE or RBNE must be judged as the
communication finished, instead of TRANS.
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 reception buffer
contents won
’t be covered with the newly incoming data, so the newly incoming data is lost.
Содержание GD32F10 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F10x Arm Cortex M3 32 bit MCU User Manual Revision 2 6 Jun 2022 ...
Страница 63: ...GD32F10x User Manual 63 programmed during the chip production ...
Страница 117: ...GD32F10x User Manual 117 010 1 0 011 0 9 ...
Страница 416: ...GD32F10x User Manual 416 shadow register updates every update event ...
Страница 427: ...GD32F10x User Manual 427 value ...
Страница 518: ...GD32F10x User Manual 518 These bits are not used in SPI mode ...