Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
539
/
631
When the receive buffer is not empty, this flag is set to 1, indicating that valid data has been received into the receive
buffer. When reading the SPI_DAT register, this flag is set to 0.
BUSY flag (BUSY)
When the transfer starts, the BUSY flag (SPI_STS.BUSY) is set to 1, and when the transfer ends, the BUSY flag
(SPI_STS.BUSY) is set to 0 by hardware (software operation is invalid).
In master receiving mode (SPI_I2SCFG.MODCFG=11), the BUSY flag (SPI_STS.BUSY) is set to 0 during receiving.
When the I2S module is turned off or the transmission is completed, this flag is set to 0.
In the slave continuous communication mode, between each data item transmission, the BUSY flag (SPI_STS.BUSY)
goes low in 1 I
2
S clock cycle. Therefore, do not use the BUSY flag (SPI_STS.BUSY) to handle the sending and
receiving of each data item.
Channel Side flag (CHSIDE)
The CHSIDE (SPI_STS.CHSIDE) bit is used to indicate the channel where the data currently sent and received is
located. Under the PCM standard, this flag has no meaning.
In send mode, the flag is updated when the TE flag (SPI_STS.TE) is set; in receive mode, the flag is updated when
the RNE flag (SPI_STS.RNE) is set. In the process of sending and receiving, if an overflow (SPI_STS.OVER) or
underflow (SPI_STS.UNDER) error occurs, this flag is meaningless, and the I2S needs to be turned off and then
turned on again.
Error flag
The SPI_STS register has 2 error flag bits.
Overflow flag (OVER)
When the RNE flag (SPI_STS.RNE) is set to 1, but there is still data sent to the receive buffer, an overflow error will
occur. At this time, the OVER flag (SPI_STS.OVER) is set to 1. An interrupt will be generated if the user enables
the corresponding interrupt. All data received after this time will be lost, and the SPI_DAT register only retains the
previously unread data.
Reading the SPI_DAT register and the SPI_STS register in turn to clear the SPI_STS.OVER bit.
Underflow flag (UNDER)
In slave send mode, when the first clock edge of sending data arrives, if the send buffer is still empty, the UNDER
flag (SPI_STS.UNDER) is set to 1. An interrupt will be generated if the user enables the corresponding interrupt.
Reading the SPI_STS register to clears the SPI_STS.UNDER bit.
I
2
S interrupt
The following table lists all I
2
S interrupts.