DocID018909 Rev 11
941/1731
RM0090
Serial audio interface (SAI)
957
29.14 Interrupt
sources
The SAI has 7 possible interrupt sources as illustrated by
Below are the SAI configuration steps to follow when an interrupt occurs:
1.
Disable SAI interrupt.
2. Configure
SAI.
3. Configure SAI interrupt source.
4. Enable
SAI.
29.15
Disabling the SAI
The audio block in the SAI can be disabled at any moment by clearing bit SAIxEN in the
SAI_xCR1 register. All the frames that have already started will be automatically completed
before the total extinction of the SAI. Bit SAIxEN in the SAI_xCR1 register will stay high until
the SAI is completely switched-off at the end of the current audio frame transfer.
Table 130. Interrupt sources
Interrupt
source
Interru
pt
group
Audio block mode
Interrupt enable
Interrupt clear
FREQ
FREQ
Master or Slave
Receiver or transmitter
FREQIE in
SAI_xIM register
Depend on:
- FIFO threshold setting
(FLTH bits in SAI_CR2)
- Communication direction
transmitter or receiver
for more details please refer
to Internal FIFOs section
OVRUDR ERROR
Master or Slave
Receiver or transmitter
OVRUDRIE in
SAI_xIM register
COVRUDR = 1 in
SAI_xCLRFR register
AFSDET
ERROR
Slave
(Not used in AC’97
mode)
AFSDETIE in
SAI_xIM register
CAFSDET = 1 in
SAI_xCLRFR register
LFSDET
ERROR
Slave
(Not used in AC’97
mode)
LFSDETIE in
SAI_xIM register
CLFSDET = 1 in
SAI_xCLRFR register
CNRDY
ERROR
Slave
(Only in AC’97 mode)
CNRDYIE in
SAI_xIM register
CCNRDY = 1 in
SAI_xCLRFR register
MUTEDE
T
MUTE
Master or slave
Receiver mode only
MUTEDETIE in
SAI_xIM register
CMUTEDET = 1 in
SAI_xCLRFR register
WCKCFG ERROR
Master with NODIV = 0
in the SAI_xCR1
register
WCKCFGIE in
SAI_xIM register
CWCKCFG = 1 in
SAI_xCLRFR register