AnsweredAssumed Answered

Generating the desired MCLK frequency in SAI1 for 44100 Hz?

Question asked by Alexsandr Golovanov on Apr 18, 2018
Latest reply on Apr 19, 2018 by waclawek.jan

        Hello! I'm doing the first project in stm32 and processing audio data is also doing it for the first time. I use stm32L452, clocked by quartz at 24 MHz, and the audio codec TLV320AIC3111. Sampling frequency 44100 Hz, data capacity 16, slots 8. With such initial data, MCLK signal frequency should be 11.2896 MHz, but in CubeMX for SAI1 it is not possible to generate an acceptable frequency with a small error in frequency. The nearest frequency is 13.714286 MHz, then FS will be 53 kHz.
        Is it possible to use such a frequency and will this affect the real signal if the TLV320AIC3111 audio codec generates its frequencies from the MCLK for ADC operation?
        To form 11.2896 MHz, you have to replace the quartz, or is there still a way to form the right frequency?
        Is it possible to generate only the MCLK signal in the wizard mode, and take the remaining signals (SCK and FS) from TLV320AIC3111, he knows how to make them from MCLK?

 


   By the way about the convenience of using Сubе MX. If you change the coefficients of the frequency divider (multiplier), then the automatic recalculation of data in Сubе MX by the value of the real frequency and the percentage deviation from the required frequency does not occur. A constant switching of the audio frequency value is required. This is not entirely convenient.

 

 

 

Outcomes