2021-08-18 03:28 AM
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
2022-04-04 12:35 AM
Hi,
I managed to make it work.
Just add the library and it should work.