2022-03-17 08:22 AM
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 :
I 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) :
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) ?
2022-03-20 07:15 AM
No one has an idea ?
2022-03-20 05:32 PM
Don't you see the chip has two PLLs?
For 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.