cancel
Showing results for 
Search instead for 
Did you mean: 

How to set SAI(I2S/TDM4) register of STM32G4(or STM32F4, STM32F7)

HJin.1
Associate

I need advice on setting up I2S of ADXL317 IC.

I am trying to set up using CUBEMX, but the timing is not correct

BCLK is not 3.072Mhz, 2.12Mhz comes out

As shown in the picture below, what part settings need to be changed to match the timing?

0693W000001rGJsQAM.png

0693W000001rGLoQAM.png

2 REPLIES 2
TDK
Guru

Your system clock speed needs to be a multiple of 256 times the target audio frequency. A clock of 160MHz will get you pretty close.

If you feel a post has answered your question, please click "Accept as Solution".

Hello @HJin.1​ ,

how did you solve the issue with the 1.8V I2C Connection to the STM32G4? On the ADXL317 there are two supplies:

1) 3.0 to 3.6V (3.3 Typ.) for VCC-Supply-Voltage (Input)

2) 1.8V for VDD (Internal Regulator Output Voltage. Use this pin for the I2 C high reference)

Is it possible to configure the STM32G4 to use 3.3V on some IO's and use the 1.8V on other IO's?

Thanks a lot.

Best Regards, Seppel