pub enum SaiInterrupt {
Freq,
Ovrudr,
AfsDet,
LfsDet,
CnRdy,
MuteDet,
WckCfg,
}
Expand description
The type of SAI interrupt to configure. Reference Section 41.5 of the L4 RM. Enabled in xIM register, yIE fields. See H743 RM, section 51.5: SAI interrupts.
Variants§
Freq
FIFO request interrupt enable. When this bit is set, an interrupt is generated if the FREQ bit in the SAI_xSR register is set. Since the audio block defaults to operate as a transmitter after reset, the MODE bit must be configured before setting FREQIE to avoid a parasitic interrupt in receiver mode
Ovrudr
When the audio block is configured as receiver, an overrun condition may appear if data are received in an audio frame when the FIFO is full and not able to store the received data. In this case, the received data are lost, the flag OVRUDR in the SAI_xSR register is set and an interrupt is generated if OVRUDRIE bit is set in the SAI_xIM register.
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 664). This avoids desynchronization between the memory pointer and the slot in the audio frame.
AfsDet
The AFSDET flag is used only in slave mode. It is never asserted in master mode. It indicates that a frame synchronization (FS) has been detected earlier than expected since the frame length, the frame polarity, the frame offset are defined and known.
LfsDet
The LFSDET flag in the SAI_xSR register can be set only when the SAI audio block operates as a slave. The frame length, the frame polarity and the frame offset configuration are known in register SAI_xFRcr().
CnRdy
The CNRDY flag in the SAI_xSR register is relevant only if the SAI audio block is configured to operate in AC’97 mode (PRTCFG[1:0] = 10 in the SAI_xCR1 register). If CNRDYIE bit is set in the SAI_xIM register, an interrupt is generated when the CNRDY flag is set. CNRDY is asserted when the Codec is not ready to communicate during the reception of the TAG 0 (slot0) of the AC’97 audio frame.
MuteDet
Mute detection
WckCfg
When the audio block operates as a master (MODE[1] = 0) and NOMCK bit is equal to 0, the WCKCFG flag is set as soon as the SAI is enabled if the following conditions are met: • (FRL+1) is not a power of 2, and • (FRL+1) is not between 8 and 256. MODE, NOMCK, and SAIEN bits belong to SAI_xCR1 register and FRL to SAI_xFRCR register.
Trait Implementations§
Source§impl Clone for SaiInterrupt
impl Clone for SaiInterrupt
Source§fn clone(&self) -> SaiInterrupt
fn clone(&self) -> SaiInterrupt
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more