RM0090
29
Serial audio interface (SAI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 926
29.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 926
29.2
Main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 927
29.3
Functional block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928
29.4
Main SAI modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 929
29.5
SAI synchronization mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 930
29.6
Audio data size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 930
29.7
Frame synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 930
29.7.1
29.7.2
29.7.3
29.7.4
29.7.5
29.8
Slot configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 933
29.9
SAI clock generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 935
29.10 Internal FIFOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 936
29.11 AC'97 link controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 939
29.12 Specific features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 940
29.12.1 Mute mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 940
29.12.2 MONO/STEREO function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 940
29.12.3 Companding mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 941
29.12.4 Output data line management on an inactive slot . . . . . . . . . . . . . . . . 942
29.13 Error flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 944
29.13.1 FIFO overrun/underrun (OVRUDR) . . . . . . . . . . . . . . . . . . . . . . . . . . . 944
29.13.2 Anticipated frame synchronisation detection (AFSDET) . . . . . . . . . . . 946
29.13.3 Late frame synchronization detection . . . . . . . . . . . . . . . . . . . . . . . . . 946
29.13.4 Codec not ready (CNRDY AC'97) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 947
29.13.5 Wrong clock configuration in master mode (with NODIV = 0) . . . . . . . 947
29.14 Interrupt sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 948
29.15 Disabling the SAI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 948
29.16 SAI DMA interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 949
29.17 SAI registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 950
29.17.1 SAI xConfiguration register 1 (SAI_xCR1) where x is A or B . . . . . . . . 950
29.17.2 SAI xConfiguration register 2 (SAI_xCR2) where x is A or B . . . . . . . . 953
29.17.3 SAI xFrame configuration register (SAI_XFRCR) where x is A or B . . 955
Frame length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 931
Frame synchronization polarity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 931
Frame synchronization active level length . . . . . . . . . . . . . . . . . . . . . . 932
Frame synchronization offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 932
FS signal role . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 932
RM0090 Rev 18
Contents
27/1749
39
Need help?
Do you have a question about the STM32F405 and is the answer not in the manual?
Questions and answers