2019-11-06 08:55 AM
Hi,
I have a problem with an audio application on the STM32WB55 board. I would like to receive data from a digital microphone over the SAI inferface. I setup the Clock for this interface to 3.09MHz. After that I receive Data over the interface by polling the sensor. For the conversion to a PCM signal I use the PDM library and the PDM_Filter() function.
My output signal from this funktion isn´t correct. I don´t know, if my receiving function is correct, too. I append some photos of the PDM signal and the PCM signal. I am new in microcontroller programming. I would be glad if anyone has some advice for me.
Thanks Robin
2019-11-12 06:47 AM
Hi Robin, I checked with our experts and they told me as follows. Regarding the code you shared, there is a couple of things that should be revised:
The suggested method to acquire and process microphone data is to use the DMA and related functions. For this reason, I suggest you to check in the MEMSMIC1 CubeMX function pack the PDM-PCM conversion example for your specific MCU (STM32WB55 ). By now, this example uses the SAI as I2S, the standard digital audio interface but, having this part number a dedicated PDM acquisition peripheral, the ideal thing would be use this feature. However, there is no example dedicated; it should be ready by the end of this year.
Regards