2025-07-01 7:21 PM
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.
Solved! Go to Solution.
2025-07-07 5:46 AM
Hello @Matthew_,
Microphones naturally output bit-interleaved data.
If you have bit-interleaved data, you need to apply bit-masking and shifting to convert it into byte-interleaved format before processing.
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
2025-07-02 8:28 AM
Hello @Matthew_,
I recommend consulting the following application notes and tutorial:
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
2025-07-03 7:14 PM
Hello @Dor_RH Thank you so much for your answers. I have checked out the links you mentioned, but it would be great to clearly confirm that the incoming pdm streams from the microphones are either bit-interleaved or byte-interleaved because i see no deinterleaving steps in the successful community post you mentioned. Really appreciate your help.
2025-07-07 5:46 AM
Hello @Matthew_,
Microphones naturally output bit-interleaved data.
If you have bit-interleaved data, you need to apply bit-masking and shifting to convert it into byte-interleaved format before processing.
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
2025-07-07 7:01 PM
Hello @Dor_RH , thank you so much. This helps me pin down my problem.