AT32F421
Series Reference Manual
2022.11.11
Page 160
Rev 2.02
Master device transmission:
Set the I2SMSEL bit, and OPERSEL[1:0]=10, the I
2
S will work in master device transmission mode.
Figure 13-16 I
2
S master device transmission
I2S master
CK
SD
WS
I2S slave
CK
SD
WS
Master device reception:
Set the I2SMSEL bit, and OPERSEL[1: 0]=11, the I
2
S will work in master device reception mode.
Figure 13-17 I
2
S master device reception
I2S master
CK
SD
WS
I2S slave
CK
SD
WS
13.3.3 Audio protocol selector
While being used as I
2
S, the SPI supports multiple audio protocols. The user can control the audio
protocol selector through software configuration to select the desired audio protocol, with the data bits
and channel bits being controlled by the audio protocol selector. Besides, the user can also select the
data bits and channel bits through software configuration. Meanwhile, the audio protocol selector
manages the WS controller, output or detect the WS signal that meets the protocol requirements.
Select audio protocol by setting the STDSEL bit
STDSLE=00: Philips standard
STDSLE=01: MSB-aligned standard (left-aligned)
STDSLE=10: LSB-aligned standard (right-aligned)
STDSLE=11: PCM standard
Select PCM frame synchronization format: PCMFSSEL=1 for PCM long frame synchronization,
PCMFSSEL=0 for short frame synchronization (this step is required when selecting PCM
protocol)
Select data bits by setting the I2SDBN bit
I2SDBN=00: 16 bit
I2SDBN =01: 24 bit
I2SDBN =10: 32 bit