cancel
Showing results for 
Search instead for 
Did you mean: 

Does the PDM2PCM decoder library ( https://www.st.com/en/licensed-software/audiopdm-mw.html) work on the STM32G491?

PPere.2
Associate

I'm trying to use an STM32G491 in a voice recognition application. This is a single microphone, mono voice capture application. I'm using an NUGLEOG491RE and an MP34DT05-A microphone (1/4 STEVAL-MIC001V1) for testing. I need to convert the PDM stream from the mic to PCM for processing.

My plan is to use the PDM2PCM decoder library ( https://www.st.com/en/licensed-software/audiopdm-mw.html ) to do the job.

All the examples I have found are for the STM32F. I'm basing my software in the "Audio_playback_and_record" demo for the STM32F411EDISCO

Since this library is supplied in binary form, debugging is not easy. After many unsuccessful tests, I have feed the filter function with a simulated PDM stream for a constant 0 amplitude (0xAAAA) and instead of having a PCM stream for zero as output (I was expecting a 0x8000 PCM output stream) I have a constant 0x014C stream. Probably this should have been my first test.... I have attached an extract of the code.

Does any one have experience in using this library in the STM32G ?

Thanks in advance

Paulo

1 REPLY 1
victagayun
Senior III

Hi,

I managed to make it work.

Just add the library and it should work.

https://community.st.com/s/question/0D53W00001TGJ2wSAH/why-is-pdm2pcm-not-enabled-for-stm32g4-in-cubemx