2025-11-21 3:21 AM
Heyho,
do all SAIs in all MCUs offer the SPDIF output feature?
CubeMx and online MCU selectors do not show this info, no time to check 20 more datasheets.
For the few STM32 I know and worked or played with (G4, F7, H7) the answer is yes.
Merci!
2025-11-21 3:51 AM - edited 2025-11-21 3:54 AM
Hi,
you tried using the SPDIF output ? works really ?
Because i looked at the details and there (on H743) is no subcode etc inserted,so its just a basic serial output in NRZ format, but no real full SPDIF .
+
see , what our AI telling:
Not all SAI peripherals in all STM32 MCUs support the SPDIF output feature. For example, STM32L4, STM32L4+, STM32U3, and STM32U5 devices offer SPDIF output only when the audio block is configured as a transmitter. The availability of this feature depends on the specific device and SAI instance, as indicated in the official documentation tables and descriptions.
It is important to consult the specific device's documentation for detailed support and configuration options.
No, not all SAI peripherals in all STM32 MCUs offer the SPDIF output feature. The availability of SPDIF output depends on the specific STM32 series, device sub-family, and SAI instance. Some series do not support SAI or SPDIF at all, while others have restrictions or only support SPDIF output in certain configurations.
For additional support or to discuss your specific application with ST experts, you’re welcome to join conversations in STM32 forums.
2025-11-21 5:28 AM
> you tried using the SPDIF output ? works really ?
Yes. That was the first useful stuff I did with an STM32 (G4), and always used it in other projects for testing, so far on:
No problems with simple sine output. Using that to test out SPDIF input cards, and I love to see this perfect digitally created sine (THD+N > 140dB) in our analyser SW. :D
Getting some non-audio user data into the stream was a bit fiddly, but that works too.
> AI answer
Thanks for trying, but these AI answers recently were too often wrong, at least in the important details.
Example:
compare to AI answer above... :D
2025-11-21 5:41 AM - edited 2025-11-21 6:24 AM
So fiddling the status bits etc in the stream before sending, yes , that should work.
But i would not call this a SPDIF output module, its just a biphase mark code transmitter, the spdif comes with manually puzzling the stream together from data and control words, to get a working spdif stream. Right ?
+
asking AI about this: is SAI spdif output avail in H563 serie ?
The STM32H563 series supports SPDIF output via its Serial Audio Interface (SAI) peripheral. Both SAI1 and SAI2 blocks on STM32H563xx devices are capable of SPDIF output when configured as transmitters.
Yes, the STM32H563 series supports SAI SPDIF output on both SAI1 and SAI2 blocks, but only in transmitter mode. Configuration requires setting the SAI to SPDIF mode with specific register settings, and there are some limitations such as fixed data size and use of only the SD line.
2025-11-21 6:15 AM
Hey, thanks for raising this question! From my experience with STM32 MCUs like G4, F7, and H7, the SAI modules do support SPDIF output, which makes audio interface projects much easier. I agree that CubeMX and online selectors don’t clearly indicate this, so checking datasheets is sometimes unavoidable. It would be great if ST could provide a consolidated table showing which MCUs fully support SPDIF that would save a lot of time for developers.