Figure 294. Overrun Detection Error - STMicroelectronics STM32F405 Reference Manual

Advanced arm-based 32-bit mcus
Table of Contents

Advertisement

Serial audio interface (SAI)
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.
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.
938/1731

Figure 294. Overrun detection error

DocID018909 Rev 11
Figure
294).
RM0090

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F405 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF