Skip to main content
Visitor II
May 13, 2021
Question

PDM2PCM example code

  • May 13, 2021
  • 3 replies
  • 3936 views

Hello,

I am trying to understand the PDM2PCM conversion using I2S as the receiving protocol. Does anyone have an easy example for generating a single PCM sample from the PDM data bits? I am having some difficulty doing this using the VM3000 PDM MEMS microphone.

Any help would really be appreciated.

Thanks

    This topic has been closed for replies.

    3 replies

    Technical Moderator
    May 17, 2021

    Hello @kcire L.​ ,

    Which STM32 are using ?

    Have a look at these resources, it may helpful for you depending to your needs.

    • UM2372 User manual STM32Cube PDM2PCM software library for the STM32F4/F7/H7 Series.

    The performances for PDM2PCM library and the Frequency required depends on the configuration of many factors : sampling Freq, resolution etc.

    The UM2372 provides resources requirements for memories and frequency for a PCM sample rate and detailed the parameters for the configuration of the library.

    • AN5027 Application note Interfacing PDM digital microphones using STM32 MCUs and MPUs
    • AN3998 Application note PDM audio software decoding on STM32 microcontrollers

    Hope this helps you :smiling_face_with_smiling_eyes:!

    Imen

    kcire L.Author
    Visitor II
    May 17, 2021

    Hi Yes, I have seen those resources you posted. I am using the NUCLEO-F401RE.

    Any ideas on how to convert a single sample for each PDM_Filter() call?

    Thanks

    Technical Moderator
    May 19, 2021

    I am checking if there is a PDM2PCM example

    I will try to contact expert internally for helping and I will come back to you with details.

    Imen

    kcire L.Author
    Visitor II
    May 19, 2021

    Thanks very much! I look forward to hearing back from you.

    Technical Moderator
    June 2, 2021

    Hi @kcire L.​ ,

    Sorry for my late reply, but I've found it difficult to come back to you as the expert was on leave.

    and I just received a response from him that unfortunately there is no such example available.

    Imen