2022-03-28 05:20 AM
I'm trying to use the MEMS1 microphone streaming example, with 4 pdm microphone and a stm32wb55. I am able to use it to get a 48kHz 16 bits per sample with all the microphones without any issue.
But when I try to use 24 bits per sample (I'm not sure this is how im supposed to set 24 bits depth but didn't find any other part related to resolution in the code) :
The audio acquisition I get on Audacity is wrong :
The first two channels are full of sound, third channel is deaf and 4th channel works fine.
I have tried with 32 Bits Per Sample and there were no issues. Any idea of what's wrong ? I didn't edited the code.
I did the same test but using only two microphones, and the result was the same : first channel full of sound, and 2nd is working.
Thanks
Solved! Go to Solution.
2022-04-07 02:43 AM
Hello,
Both the PDM library and the audio USB class used in the Microphones Streaming example are not meant to be used with a 24 bit resolution. This is because almost all of our microphones (included the one mounted on the X-NUCLEO-CCA02M2) have a SNR that fits only 16 bit.
There is only 1 p/n that can support a 24 bit resolution (MP23DB01HP). It is mounted on the STEVAL-MIC006V1, that can be used as an add-on on top of the X-NUCLEO-CCA02M2, with the proper jumper configuration as explained in the user manual. To support it, you need to built your own custom library (HP_PDM) with a proper audio USB class (HP_AUDIO). Both that are used and showed in the examples called HPMicrophonesStreaming, available for now only for F4 and F7.
WB example in actual X-CUBE-MEMSMIC1 version supports only 16 bit.
You can build up your own application by porting the F4 example on the WB board. It's planned for the next official release.
Best Regards
2022-04-07 02:43 AM
Hello,
Both the PDM library and the audio USB class used in the Microphones Streaming example are not meant to be used with a 24 bit resolution. This is because almost all of our microphones (included the one mounted on the X-NUCLEO-CCA02M2) have a SNR that fits only 16 bit.
There is only 1 p/n that can support a 24 bit resolution (MP23DB01HP). It is mounted on the STEVAL-MIC006V1, that can be used as an add-on on top of the X-NUCLEO-CCA02M2, with the proper jumper configuration as explained in the user manual. To support it, you need to built your own custom library (HP_PDM) with a proper audio USB class (HP_AUDIO). Both that are used and showed in the examples called HPMicrophonesStreaming, available for now only for F4 and F7.
WB example in actual X-CUBE-MEMSMIC1 version supports only 16 bit.
You can build up your own application by porting the F4 example on the WB board. It's planned for the next official release.
Best Regards
2022-04-08 06:08 AM
Thanks you for your answer, I appreciate it. Ok so 24 bit resolution cannot be done with pdmtopcm library. It a bit confusing that in the code of Microphone streaming project with stm32wb55 there is switch(AudioInCtx[Instance].BitsPerSample) with a case for 24 bits.
I am not using a ST microphone, so I'm wondering how can you tell with the SNR if 24 bits fits or not.
Best Regards
2022-04-12 08:25 AM
Hi,
The switch you are referring to ( switch(AudioInCtx[Instance].BitsPerSample) ) is part of the CCA02M2 BSP. That board can be used with different add-on microphones, which can work also with a different bit-depth resolution.
To be used properly, user must link the proper PDM Filter (PDM or HP_PDM) into the project.
In few words, we can use the same BSP with different PDM middlewares.
As for now, user must take care about linking the right library in base of the microphone used.
Best Regards
2022-04-14 02:44 AM
Thank you !