cancel
Showing results for 
Search instead for 
Did you mean: 

SAI I2S Mono Mode Not An Option

SHamm.18
Associate II

When using SAI for I2S, STM32CubeIDE does not give you the option to choose Mono mode. It's only option is Stereo Mode. However, STM32 SAI HAL supports both SAI_STEREOMODE as well as SAI_MONOMODE, so I think this should be an option.

14 REPLIES 14

Hello I am using STM32F407 discovery kit, CubeIDE 1.8.0 and FW_F4 V1.26.2.

I plan to connect the mono mic via I2S as well and should be connected in mono mode.

Where do you get to change hsai_BlockA1.Init.MonoStereoMode to mono mode?

I cannot seem to find this code.

I am looking in:

MX_I2S2_Init(),

stm32f4xx_hal_i2s.h,

stm32f4xx_hal_i2s_ex.h, and

stm32f4xx_hal_i2s.c.

Where should I look for to modify?

This thread discusses SAI module, which is not present in the 'F407.

The SPI/I2S module does not have MONO option.

JW

Sorry, my bad, just realized that!

Anyway, "The SPI/I2S module does not have MONO option"

can I use?

hi2s2.Init.DataFormat = I2S_DATAFORMAT_16B_EXTENDED;

I don't know. I don't know your application and I don't use Cube.

JW

I was using the F411 for mono replay, mono source (for compact size) to mono amplifier - I had to make the data look like stereo to use the HAL driver.