Serial audio interface (SAI)
RM0090
938/1731
DocID018909 Rev 11
was stored internally when the overrun condition was detected, and this, to avoid data slot
de-alignment in the destination memory (refer to
The OVRUDR flag is cleared when bit COVRUDR is set in the SAI_xCLRFR register.
Figure 294. Overrun detection error
Underrun
An underrun may occur when the audio block in the SAI is a transmitter and the FIFO is
empty when data needs to be transmitted (the audio block configuration (Master or Slave) is
not relevant). If an underrun is detected, the software must resynchronize data and slot.
Proceed as follows:
1.
Disable the SAI peripheral by resetting the SAIEN bit of the SAI_xCR1 register. Check
that the SAI has been disabled by reading back the SAIEN bit (SAIEN should be equal
to 0).
2. Flush the Tx FIFO through the FFLUS bit of the SAI_xCR2 register.
3. Re-assigned to the correct data to be transferred on the first active slot of the new
frame.
4. Re-enabling the SAI peripheral (SAIEN bit set to 1).
The underrun event sets the OVRUDR flag in the SAI_xSR register and an interrupt is
generated if the OVRUDRIE bit is set in the SAI_xIM register. To clear this flag, set the
COVRUDR bit in the SAI_xCLRFR register.
069
VFN
GDWD
6ORW21
([DPSOH),)2RYHUUXQRQ6ORW
$XGLRIUDPH
$XGLRIUDPH
6ORWQ21
21
),)2IXOO
2958'5
6ORW21
3LOT/.
6ORW21
6ORW21
5HFHLYHGGDWDGLVFDUGHG
'DWDVWRUHGDJDLQLQ),)2
&2958'5