RM0432
The OVRUDR flag is cleared when COVRUDR bit is set in the SAI_xCLRFR register.
data
FIFO full
OVRUDR
Underrun
An underrun may occur when the audio block in the SAI is a transmitter and the FIFO is
empty when data need to be transmitted. If an underrun is detected, the slot number for
which the event occurs is stored and MUTE value (00) is sent until the FIFO is ready to
transmit the data corresponding to the slot for which the underrun was detected (refer to
Figure
567). This avoids desynchronization between the memory pointer and the slot in the
audio frame.
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
COVRUDR bit in the SAI_xCLRFR register.
The underrun event can occur when the audio subblock is configured as master or slave.
SD (output)
FIFO empty
OVRUND
Figure 566. Overrun detection error
Audio frame
sck
Slot 0 ON
Slot 1 ON Slot 1 ON Slot 0 ON
Figure 567. FIFO underrun event
Audio frame
sck
data
Slot 0 ON
MUTE
Example: FIFO overrun on Slot 1
Received data discarded
Example: FIFO underrun on Slot 1
Slot size = data size
MUTE
MUTE
OVRUND=1
RM0432 Rev 6
Serial audio interface (SAI)
Audio frame
Slot 1 ON
... ON
Data stored again in FIFO
COVRUDR = 1
Audio frame
Slot 1 ON
... ON
Slot 0 ON
Slot n ON
MS192348V2
MS192347V2
1927/2301
1961
Need help?
Do you have a question about the STM32L4+ Series and is the answer not in the manual?