GD32F20x User Manual
566
21.9.2.
I2S clock
Figure 21-47. Block diagram of I2S clock generator
8-bit
Configurable
Divider
I2SCLK
frequency dividing ratio =
DIV * 2 + OF
DIV4
DIV2
1
0
CHLEN
0
1
MCKOEN
I2S_CK
I2S_MCK
The block diagram of I2S clock generator is shown as
Figure 21-47. Block diagram of I2S
. The I2S interface clocks are configured by the DIV bits, the OF bit, the
MCKOEN bit in the SPI_I2SPSC register and the CHLEN bit in the SPI_I2SCTL register. The
I2S bitrate can be calculated by the formulas shown in
Table 21-5. I2S bitrate calculation
Table 21-5. I2S bitrate calculation formulas
MCKOEN
CHLEN
Formula
0
0
I2SCLK / (DIV * 2 + OF)
0
1
I2SCLK / (DIV * 2 + OF)
1
0
I2SCLK / (8 * (DIV * 2 + OF))
1
1
I2SCLK / (4 * (DIV * 2 + OF))
The relationship between audio sampling frequency (Fs) and I2S bitrate is defined by the
following formula:
Fs = I2S bitrate / (number of bits per channel * number of channels)
So, in order to get the desired audio sampling frequency, the clock generator needs to be
configured according to the formulas listed in
Table 21-6. Audio sampling frequency
Table 21-6. Audio sampling frequency calculation formulas
MCKOEN
CHLEN
Formula
0
0
I2SCLK / (32 * (DIV * 2 + OF))
0
1
I2SCLK / (64 * (DIV * 2 + OF))
1
0
I2SCLK / (256 * (DIV * 2 + OF))
1
1
I2SCLK / (256 * (DIV * 2 + OF))
The source of I2S clock can be either from PLLI2S or an external I2S_CKIN pin, and this is
programmable in RCU. Software should carefully calculate the factor of I2S and PLLI2S to
get the most accurate audio sampling frequency. If PLLI2S cannot meet the application
’s
Содержание GD32F20 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F20x ARM Cortex M3 32 bit MCU User Manual Revision 2 2 Oct 2019 ...
Страница 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Страница 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Страница 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Страница 385: ...GD32F20x User Manual 385 ...
Страница 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...