Some questions about SAI configuration for PDM audio acquisition
I'm using SAI PDM interface to record pdm audio coming from 4 microphones. I'm using a stm32wb55rg and the memsmic1's example.
There are some parts I don't understand with the SAI configuration in the example. Here is a part of the code provided in the example :
As I'm using 4 microphones with a wanted PCM audio sampling of 48 kHz + 64 decimation, PDM_Clock_Freq is set to 3072 and frame length is set to 16 (I didn't change these values there are the original ones), thus AudioFrequency is equal to 768 000.
But when I try to get the same configuration using the ioc interface, the max frequency I can use is 192 kHz :
Why can't I put 768 KHz ? It's a bit annoying if you can't configure all the settings directly in the ioc interface :\
Also, I see "SAI_PDM_CLOCK2_ENABLE". Why is it Clock2 and not Clock 1 ? What are the differences between these two clocks ?
Another question I have is about clock configuration. Looking at the code provided in the example, I got this clock configuration for SAI :
(Here is the part of the code I followed to get the clock configuration):
I am wondering why SAI clock is set to 49.14 MHz. As the microphone clock input need to be set to 3.071 MHz for 48Khz PCM audio with 64 decimation, I would expect something like number of mic * 3.072 MHz but It seems like I didn't understand this part.
There is this table in the reference manual of stm32wb55. Shouldn't I use the 12.288 MHz bit clock frequency instead ?
Sorry for all these questions. I'd greatly appreciate any help !
