cancel
Showing results for 
Search instead for 
Did you mean: 

No option to set OSR bit in SAI block with CubeMX on STM32H7

AFroi.1
Associate

I want to use the oversampling feature in SAI block in STM32H742/743/750 device to set MCLK = 512*Ffs (sample frequency).

There is the OSR bit in SAI configuration register 1 (SAI_ACR1) to enable this feature.

But I cannot configure this feature with CubeMX. There is no option in Parameter Settings of the SAI block in CubeMX.

But it is supported from HAL. In the init structure you can set the option to set:

hsai->Init.MckOverSampling = SAI_MCK_OVERSAMPLING_ENABLE;

to enable this function. But if you add this line in sai.c MX_SAI1_Init(void) it will be overwritten from CubeMx code generation.

Has anyone found a proper solution for that or any (hidden) optin in CubeMX to enable this function directly?

0 REPLIES 0