cancel
Showing results for 
Search instead for 
Did you mean: 

SAI Stereo and Mono number of channels

Kewin_J
Associate

Hi Community,

I'm new to STM32CubeIDE and currently working with the STM32H723Zx in the LQFP144 package. While configuring the SAI1 peripheral, I encountered something that seems counterintuitive.

When I set the output mode to Mono, the "Number of Channels" option only allows 2 channels to be selected. However, when I switch the output mode to Stereo, I can select up to 16 channels.

This behavior seems reversed to me—shouldn't mono mode allow more flexible channel selection, or at least fewer limitations than stereo?

I've attached a screenshot below for reference.
Any insights or explanations would be appreciated!

Thanks in advance.

Kewin_J_0-1751972358024.png

Kewin_J_1-1751972378266.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ghofrane GSOURI
ST Employee

Hello @Kewin_J 

In the STM32H7, SAI peripheral, mono mode always uses 2 channels because the hardware sends audio data in pairs of channels (called slots), even if you only want one audio signal. So, mono audio is duplicated or placed in one of these two channels. On the other hand, stereo mode supports multiple pairs of channels, allowing you to select up to 16 channels for multi-channel audio. This design is due to how the hardware processes audio data, not a software limitation, which is why mono mode is limited to 2 channels while stereo mode allows many more.

More details could be found in  RM0468: 56.4.13 Specific features

THX

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
Ghofrane GSOURI
ST Employee

Hello @Kewin_J 

In the STM32H7, SAI peripheral, mono mode always uses 2 channels because the hardware sends audio data in pairs of channels (called slots), even if you only want one audio signal. So, mono audio is duplicated or placed in one of these two channels. On the other hand, stereo mode supports multiple pairs of channels, allowing you to select up to 16 channels for multi-channel audio. This design is due to how the hardware processes audio data, not a software limitation, which is why mono mode is limited to 2 channels while stereo mode allows many more.

More details could be found in  RM0468: 56.4.13 Specific features

THX

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.