Skip to main content
Visitor II
March 17, 2022
Question

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

  • March 17, 2022
  • 2 replies
  • 1183 views

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) ?

    This topic has been closed for replies.

    2 replies

    EEnco.1Author
    Visitor II
    March 20, 2022

    No one has an idea ?

    Graduate II
    March 21, 2022

    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.