cancel
Showing results for 
Search instead for 
Did you mean: 

PDM2PCM stereo audio acquisition via SAI/ I2S

Matthew_
Associate

Hello Gurus :)), I am currently trying to acquire 2 mic stereo data with SAI interface and have some questions regarding to de-interleave the input PDM stream. My nucleo board is nucleo-f446re. I am currently acquiring 8 bit pdm data with the relevant pdm buffer, but I am not certain if these PDM input stereo data are bit-interleaved or byte-interleaved.I have already read AN446, STM32 microphone acquisition youtube 8 video series, UM2372, rm for my board, and most of they say they are bit interleaved but in XCUBE-MEMS1 package example, I saw no deinterleaving or anything.  If they are bit-interleaved, do I need to conduct bit-masking and bit-shifting before processing them in PDM2PCM middleware? Would love to know some sample codes too. 

1 REPLY 1
Dor_RH
ST Employee

Hello @Matthew_,

I recommend consulting the following application notes and tutorial:

  • AN3998: This application note offers comprehensive details on using digital MEMS microphones with STM32 microcontrollers, including the PDM to PCM conversion process.
  • AN5027: This document explains the software decoding of PDM audio streams into PCM format on STM32 microcontrollers.
  • PDM to PCM Conversion Tutorial: This step-by-step tutorial guides you through setting up and performing PDM to PCM conversion.

Additionally, I suggest checking out these posts on the STMicroelectronics Community:

I hope my answer has helped you. When your question is answered, please select this topic as the solution that answered you, as it will help others find that answer faster.

Thanks for your contribution.

Dor_RH