AT32F421
Series Reference Manual
2022.11.11
Page 168
Rev 2.02
13.4.3 SPI status register (SPI_STS)
Bit
Register
Reset value
Type
Description
Bit 15: 8
Reserved
0x00
resd
Forced to be 0 by hardware
Bit 7
BF
0x0
ro
Busy flag
0: SPI is not busy.
1: SPI is busy.
Bit 6
ROERR
0x0
ro
Receiver overflow error
0: No overflow error
1: Overflow error occurs.
Bit 5
MMERR
0x0
ro
Master mode error
This bit is set by hardware and cleared by software
(read/write access to the SPI_STS register, followed by
write operation to the SPI_CTRL1 register)
0: No mode error
1: Mode error occurs.
Bit 4
CCERR
0x0
rw0c
CRC error
Set by hardware, and cleared by software.
0: No CRC error
1: CRC error occurs.
Bit 3
TUERR
0x0
ro
Transmitter underload error
Set by hardware, and cleared by software (read the
SPI_STS register).
0: No underload error
1: Underload error occurs.
Note: This bit is only used in I
2
S mode.
Bit 2
ACS
0x0
ro
Audio channel state
This bit indicates the status of the current audio channel.
0: Left channel
1: Right channel
Note: This bit is only used in I
2
S mode.
Bit 1
TDBE
0x1
ro
Transmit data buffer empty
0: Transmit data buffer is not empty.
1: Transmit data buffer is not empty.
Bit 0
RDBF
0x0
ro
Receive data buffer full
0: Transmit data buffer is not full.
1: Transmit data buffer is full.
13.4.4 SPI data register (SPI_DT)
Bit
Register
Reset value
Type
Description
Bit 15: 0
DT
0x0000
rw
Data value
This register controls read and write operations. When the
data bit is set as 8 bit, only the 8-bit LSB [7: 0] is valid.
13.4.5 SPICRC register (SPI_CPOLY) (Not used in I
2
S mode)
Bit
Register
Reset value
Type
Description
Bit 15: 0
CPOLY
0x0007
rw
CRC polynomial
This register contains the polynomial used for CRC
calculation.
Note: This register is valid only in SPI mode.