cancel
Showing results for 
Search instead for 
Did you mean: 

What frequency Should I use for 48khz audio sampling with SAI Interface

EEnco.1
Associate III

I am using a stm32wb55 and I want to acquire PDM data from a MEMS microphone and convert it into PCM. I want to use the SAI PDM interface.

I have a doubt about the frequency I should put there :

0693W00000Kd2EcQAJ.pngI want to use a decimation of 64. In the reference manual I see this (under the chart it's written that the values are found using decimation of 64) :

0693W00000Kd2FQQAZ.png 

As I want to record one microphone with 48kHz and 64 decimation, 3.072 MHz makes sense (48k*64) but I am confused by the 6.144 MHz in the reference manual.

In the first picture, should I put 3.072 or 6.144 ? I think that my microphone only accept between 1MHz and 3.5 MHz. Also, if I try to put 3.072 MHz, the only solution found by cubeIDE is 3.20 MHz. Any solution to this or do I have to work with 3.20MHz (in the case 3.072MHz is the way to go) ?

2 REPLIES 2
EEnco.1
Associate III

No one has an idea ?

Piranha
Chief II

Don't you see the chip has two PLLs?

0693W00000KdKoEQAV.pngFor 3,072 MHz there are definitely closer combinations than 3,2 MHz. Though the lowest frequency one can get from those PLLs is 96 MHz / 31 = 3,097 MHz. Also, when using internal HSI/MSI oscillators, the accuracy of the audio frequency is not that important because the frequency of those oscillators is not so accurate anyway.

When using HSE, just put a 12,288 MHz crystal.