Serial audio interface (SAI)
Receiver mode (bit MODE[0] = 1 in SAI_xCR1)
Transmitter mode (bit MODE[0] = 0 in SAI_xCR1)
1. Not applicable when AC'97 or SPDIF are selected.
Expansion and compression mode are automatically selected through the SAI_xCR2:
•
If the SAI audio block is configured to be a transmitter, and if the COMP[1] bit is set in
the SAI_xCR2 register, the compression mode will be applied.
•
If the SAI audio block is declared as a receiver, the expansion algorithm will be applied.
Output data line management on an inactive slot
In transmitter mode, it is possible to choose the behavior of the SD line output when an
inactive slot is sent on the data line (via TRIS bit).
•
Either the SAI forces 0 on the SD output line when an inactive slot is transmitted, or
•
The line is released in HI-z state at the end of the last bit of data transferred, to release
the line for other transmitters connected to this node.
It is important to note that the two transmitters cannot attempt to drive the same SD output
pin simultaneously, which could result in a short circuit. To ensure a gap between
transmissions, if the data is lower than 32-bit, the data can be extended to 32-bit by setting
bit SLOTSZ[1:0] = 10 in the SAI_xSLOTR register. The SD output pin will then be tri-stated
at the end of the LSB of the active slot (during the padding to 0 phase to extend the data to
32-bit) if the following slot is declared inactive.
In addition, if the number of slots multiplied by the slot size is lower than the frame length,
the SD output line will be tri-stated when the padding to 0 is done to complete the audio
frame.
Figure 564
1924/2301
Figure 563. Data companding hardware in an audio block in the SAI
COMP[1]
FIFO
FIFO
illustrates these behaviors.
expand
1
0
compress
COMP[1]
RM0432 Rev 6
32-bit shift register
0
32-bit shift register
1
RM0432
SD
SD
MS19244V1
Need help?
Do you have a question about the STM32L4+ Series and is the answer not in the manual?