AnsweredAssumed Answered

CubeMX 4.14.0 STM32 FW_F7_V1.3.1 SAI I2S Initialization problem

Question asked by Fischer.Thomas.004 on May 20, 2016
Latest reply on May 20, 2016 by ForumSTM32.ForumSTM3

When selecting I2S protocol for SAI Interface,

CubeMX does not allow to modify all parameters of SAI Interface,

in my case I need to change  the clock Strobing for receive in  SAI B to SAI_CLOCKSTROBING_RISINGEDGE,

 

the generated code from cubeMX and the firmware functions set the clock strobing

fixed to  SAI_CLOCKSTROBING_FALINGEDGE in function SAI_InitI2S() for both transmit and receive block.

 

I changed MX_SAI_Init()

 

to

...

HAL_SAI_InitProtocol(&hsai_BlockB2, SAI_I2S_STANDARD, SAI_PROTOCOL_DATASIZE_16BIT, 2);

hsai_BlockB2.Init.ClockStrobing = SAI_CLOCKSTROBING_RISINGEDGE;

HAL_SAI_Init(&hsai_BlockB2);

...

 

and removed HAL_SAI_Init() in function HAL_SAI_InitProtocol()

 

It would be better to just make a predefined setting in CubeMX for I2S protocol and then show the SAI Configuration page with the FREE protocol settings.

This would allow the user to modify the settings if needed.

 

best regards

Outcomes