
AT32F413
Series Reference Manual
2022.06.27
Page 168
Rev 2.00
MOSI: Master Out/Slave In. The pin transmits data in SPI master mode, and receives data in SPI
slave mode.
SCK: SPI communication clock pin. In SPI master mode, the pin outputs the communication
clock to peripherals. In SPI slave mode, the pin inputs the comumication clock to SPI interface.
CS: Chip Select. This is an optional pin which selects master/slave device. Refer to
Section
13.2.12 Precautions
It is necessary to read the DT register in order to get CRC value at the end of CRC reception.
13.3 I
2
S functional description
13.3.1 I
2
S introduction
The I2S can be configured by software as master repection/transmission, and slave
reception/transmission, supporting four kinds of audio protocols including Philips standard, MSB-aligned
standard, LSB-aligned standard and PCM standard, respectively. The DMA transfer is also supported.
Figure 13-13 I
2
S block diagram
I2S_CLK controller
SPI_STS
BF
ROE
RR
MME
RR
CCE
RR
TUER
R
ACS
TDBE RDBF
Communication controller
WS
controller
I2SCLKPOL
I2SDIV[9:0]
I2SMCLKOE
I2SODD
Transmitter logic
SD
CK
WS
Receiver logic
Receive & transmit date
shift logic
Interrupt generator
ERRIE TEIE RNEIE
MCK
Audio
protocol
selector
PCMFSSEL
STDSEL
I2SDBN
I2SCBN
Operation selector
OPERSEL[1:0]
Main features when SPI is used as I
2
S:
Programmable operation mode
─
Slave device transmission
─
Slave device reception
─
Master device transmission
─
Master device reception
Programmable clock polarity
Programmable clock frequency (8 KHz to 192 KHz)
Prorammable data bits (16 bit, 24 bit, 32 bit)
Programmable channel bits (16 bit, 24 bit)