DocID025202 Rev 7
940/1080
RM0365
Serial peripheral interface / inter-IC sound (SPI/I2S)
959
When the master clock is generated (MCKOE in the SPIx_I2SPR register is set):
f
S
= I2SxCLK / [(16*2)*((2*ODD)*8)] when the channel frame is 16-bit wide
f
S
= I2SxCLK / [(32*2)*((2*ODD)*4)] when the channel frame is 32-bit wide
When the master clock is disabled (MCKOE bit cleared):
f
S
= I2SxCLK / [(16*2)*((2*ODD))] when the channel frame is 16-bit wide
f
S
= I2SxCLK / [(32*2)*((2*ODD))] when the channel frame is 32-bit wide
provides example precision values for different clock configurations.
Note:
Other configurations are possible that allow optimum clock precision.
30.7.6 I
2
S master mode
The I
2
S can be configured as follows:
•
In master mode for transmission or reception (half-duplex mode using I2Sx)
•
In master mode transmission and reception (full-duplex mode using I2Sx and
I2Sx_ext).
This means that the serial clock is generated on the CK pin as well as the Word Select
signal WS. Master clock (MCK) may be output or not, controlled by the MCKOE bit in the
SPIx_I2SPR register.
Table 164. Audio-frequency precision using standard 8 MHz HSE
(1)
SYSCLK
(MHz)
I2S_DIV
I2S_ODD
MCLK
Target f
S
(Hz)
Real f
S
(KHz)
Error
16-bit 32-bit
16-bit 32-bit
16-bit
32-bit
16-bit
32-bit
72
11
6
1
0
No
96000
97826.09
93750
1.90%
2.34%
72
23
11
1
1
No
48000
47872.34 48913.04
0.27%
1.90%
72
25
13
1
0
No
44100
44117.65
43269.23
0.04%
1.88%
72
35
17
0
1
No
32000
32142.86 32142.86
0.44%
0.44%
72
51
25
0
1
No
22050
22058.82 22058.82
0.04%
0.04%
72
70
35
1
0
No
16000
15675.75 16071.43
0.27%
0.45%
72
102
51
0
0
No
11025
11029.41
11029.41
0.04%
0.04%
72
140
70
1
1
No
8000
8007.11
7978.72
0.09%
0.27%
72
3
3
0
0
Yes
48000
46875
46875
2.34%
2.34%
72
3
3
0
0
Yes
44100
46875
46875
6.29%
6.29%
72
9
9
0
0
Yes
32000
31250
31250
2.34%
2.34%
72
6
6
1
1
Yes
22050
21634.61 21634.61
1.88%
1.88%
72
9
9
0
0
Yes
16000
15625
15625
2.34%
2.34%
72
13
13
0
0
Yes
11025
10817.30 10817.30
1.88%
1.88%
72
17
17
1
1
Yes
8000
8035.71
8035.71
0.45%
0.45%
1. This table gives only example values for different clock configurations. Other configurations allowing optimum clock
precision are possible.