cancel
Showing results for 
Search instead for 
Did you mean: 

How to interface 4 PDM microphones with Nucleo-F401RE I2S in stereo mode?

Viki
Associate II

Hello!

I need to interface 4 PDM microphones with Nucleo-F401RE(I2S1 and I2S2) in stereo mode.

Is it possible to connect 4 PDM microphones with F401RE?

Please provide me with a simple circuit diagram and a sample code to how to get data from these mics using pdm to pcm library(if possible)?

3 REPLIES 3
Foued_KH
ST Employee

Hello @Community member​ ,

I recommend you check this videos : STM32 Microphone Audio Acquisition - YouTube

If this solves your problem, please mark my answer as "Best Answer" by clicking on the "Select as Best" button, this can be helpful for Community users to find this solution faster. 

Foued

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

I have watched those videos and have read the document as well but that only shows 2 microphones not 4, and there is no code shown.

SPRAD.1
ST Employee

Hi @Community member​ 

X-CUBE-MEMSMIC1 already contains example for 4 mic acquisition with NUCLEO-F401RE.

You must simply setup the following parameter for your needs in cca02m2_conf.h file:

#define AUDIO_IN_CHANNELS 4

#define AUDIO_IN_SAMPLING_FREQUENCY 48000

Then, recompile the Microphone_Streaming example and flash it.

For the HW configuration, some soldier bridges must be opened and closed. Please follow the procedure in the package manual in chapter 3.3.3 (https://www.st.com/resource/en/user_manual/um1901-getting-started-with-the-software-package-for-analog-and-digital-mems-microphones-in-xcubememsmic1-expansion-for-stm32cube-stmicroelectronics.pdf)