GD32F20x User Manual
569
1, and I2SSTD = 10)
1.
Wait for the second last RBNE
2.
Then wait 17 I2S CK clock (clock on I2S_CK pin) cycles
3.
Clear the I2SEN bit
16-bit data packed in 32-bit frame in the audio standards except the LSB justified
standard (DTLEN = 00, CHLEN = 1, and I2SSTD is not equal to 10)
1.
Wait for the last RBNE
2.
Then wait one I2S clock cycle
3.
Clear the I2SEN bit
For all other cases
1.
Wait for the second last RBNE
2.
Then wait one I2S clock cycle
3.
Clear the I2SEN bit
I2S slave transmission sequence
The transmission sequence in slave mode is similar to that in master mode. The difference
between them is described below.
In slave mode, the slave has to be enabled before the external master starts the
communication. The transmission sequence begins when the external master sends the clock
and when the I2S_WS signal requests the transfer of data. The data has to be written to the
SPI_DATA register before the master initiates the communication. Software should write the
next audio data into SPI_DATA register before the current data finishe. Otherwise,
transmission underrun error occurs. The TXURERR flag is set and an interrupt may be
generated if the ERRIE bit in the SPI_CTL1 register is set. In this case, it is mandatory to
switch off and switch on I2S to resume the communication. In slave mode, I2SCH is sensitive
to the I2S_WS signal coming from the external master.
In order to switch off I2S, it is mandatory to clear the I2SEN bit after the TBE flag is high and
the TRANS flag is low.
I2S slave reception sequence
The reception sequence in slave mode is similar to that in master mode. The difference
between them is described below.
In slave mode, the slave has to be enabled before the external master starts the
communication. The reception sequence begins when the external master sends the clock
and when the I2S_WS signal indicates a start of the data transfer. In slave mode, I2SCH is
sensitive to the I2S_WS signal coming from the external master.
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...