RM0440 Rev 4 1813/2126
RM0440 Serial audio interface (SAI)
1858
Adjusting the bitstream clock rate
To properly program the SAI TDM interface, the user application must take into account the
settings given in Table 366, and follow the below sequence:
1. Adjust the bit clock frequency (F
SCK_A
) according to the required frequency for the
PDM bitstream clock, using the following formula:
MICNBR can be 0,1,2 or 3 (0 = 2 microphones., see Section 40.5.17)
2. Set the frame length (FRL) using the following formula
3. Configure the slot size (DS) to a multiple of (FRL+1).
FSPOL 1 FS is active High
FSOFF 0 FS is asserted on the first bit of slot 0
FBOFF 0 No offset on slot
SLOTSZ 0 Slot size = data size
NBSLOT X
To be adjusted according to the required data format, in accordance to the
slot size, and the frame length (FRL and DS). See Table 367.
SLOTEN X To be adjusted according to NBSLOT
NODIV 1 No need to generate a master clock MCLK
MCKDIV X
Depends on the frequency provided to sai_a_ker_ck input.
This parameter shall be adjusted to generate the proper bitstream clock
frequency. See Table 367.
Table 366. TDM settings (continued)
Bit Fields Values Comments
F
SCK_A
F
PDM_CK
MICNBR 1+()× 2×=