cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4 SAI2 clock configuration

kardwor1
Associate II
Posted on February 15, 2017 at 09:59

Hi,

I'm having toruble with configuring SAI clock. For 48kHz sampling rate I need 12,288MHz MCLK but I'm confused with settings in CubeMX clock configuration tab. To SAI2 clock to arbitrary 24MHz but what should be the right value? For 24MHz clock looks terrible. I can't set it to multiple of 12,288MHz or just 12,288MHz because there is no prescallers that meets this configuration. I'm using MSI as my clock source.

Clock configuration:

12MHz clock:

0690X00000606JNQAY.png

stm32l4 clock-configuration sai not-working stm32

3 REPLIES 3
kardwor1
Associate II
Posted on February 15, 2017 at 14:01

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6mO&d=%2Fa%2F0X0000000bvG%2FDpZWmsCqkBVtX.aBG4jaGs2S0VYGkImg.9VfHeARtUs&asPdf=false
Posted on February 15, 2017 at 21:55

Is your wiring and grounding and port pin setup adequate for 12MHz?

JW

kardwor1
Associate II
Posted on February 16, 2017 at 19:06

Logic analyzer was the problem. I used scope and I can see stable 12MHz