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.
2025-11-21 6:53 AM
> 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 ?
I actually do not understand your point...
For me it's good enough, I get a clean signal, with some additional info in the channel status bits (not the user bit, just checked).
I don't need compatibility to audio devices, if you mean that.
> From my experience with STM32 MCUs like G4, F7, and H7, the SAI modules do support SPDIF output...
That's what I said I have already used...
2025-11-21 7:10 AM
@LCE,
jhonwillaim21 is probably just an attempt to spam.
Btw. I don't know the answer to your original question. Lists of versions and configurations of individual modules in various STM32 families/models, is a request made here many times, simply ignored by ST; so unfortunately you have to go through all the relevant datasheets, sorry.
@AScha.3 ,
It is what it is; and while "higher level" automation surely makes a more comfortable usage, the SPDIF transmitter is in practice quite well usable even if you have to split the subcode to user-bits in individual frames "manually". There are other modules (e.g. I2C) which lack similar "higher level automation", yet they are still usable at the cost of more programming.
JW
2025-11-21 7:45 AM - edited 2025-11-21 7:50 AM
>I don't need compatibility to audio devices, if you mean that.
Right, i just use a audio connection for audio equipment, so ...we know now.
As spdif transmitter i already used CS8401 and expected similar function, as a real spdif transmitter:
So the spdif output on SAI is just a serial output using biphase mark code , the channel status etc you have to puzzle together ... 192 times, to get a valid frame block.
Your right, i just was disappointed by the "low level" spdif transmitter.
2025-11-23 11:42 PM
@AScha.3 Now I get what you mean with "low level" spdif transmitter... :D
I just had a look at my TX SPDIF source code...
Oh my, I forgot that it was that bad concerning the user and other bits. I thought there would be some registers for that, but that must have been in the Cirrus codec CS4265, which we use in a product.
But in the STM32 versions it's manual bit shifting. Blessed be the DMA with double buffering to have time for that! :D