cancel
Showing results for 
Search instead for 
Did you mean: 

How control Digital MEMS(MP45DT02)?

DSEO
Associate II

Hello,

I am testing the MP45DT02 microphone on 32F4Discovery Board.

0690X00000DXJx5QAH.png

The final goal is to measure the sensitivity of the microphone(SPL) when you operate a buzzer with a frequency of 1 kHz.

First I set up the I2S communication as below to activate the microphone.

 0690X00000DXJlxQAH.png

And below is the while loop in main function.

while (1)

 {

 HAL_I2S_Receive(&hi2s2, data, 1, 100);

 }

Question 1. Is it correct to set as shown above to read the sound data of the microphone?

Question 2. Audio Frequency is 8Khz and Frame is 16Bit.

      It is calculated as CLK = 8000 * 16 = 128Khz on MCU.

     But when I measure my CLK with my scope, I get 256Khz.

     What is the reason?

0690X00000DXJm2QAH.png

Question 3. Is there an example from ST that deals with the MP45DT02 microphone with

Discovery Board?

Please Help me

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @DSEO​ , pleas find my answers below:

  1. Yes, it seems correct;
  2. You have to consider the fact that the max frequency you can acquire (e.g. 8kHz) has to be produced by at least 16kSamples/s (from Nyquist) and that usually the mic clock is doubled for the left / right sampling acquisition. If you want to half the audio frequency, you can either double the decimation factor or half the mic clock;
  3. You can refer to this discovery kit part number --> STM32F4DISCOVERY, which implements the MP45DT02 audio processing in the STM32CubeF4 pack, in Projects\STM32F4-Discovery\Applications\Audio\Audio_playback_and_record folder. Btw, please note that all ST MEMS digital microphones are PDM microphones and can be managed at the same way at MCU level, so you can use also the NUCLEO family reference designs and expansion board such as X-NUCLEO-CCA02M2, which is a little more recent.

Regards

View solution in original post

2 REPLIES 2
Eleon BORLINI
ST Employee

Hi @DSEO​ , pleas find my answers below:

  1. Yes, it seems correct;
  2. You have to consider the fact that the max frequency you can acquire (e.g. 8kHz) has to be produced by at least 16kSamples/s (from Nyquist) and that usually the mic clock is doubled for the left / right sampling acquisition. If you want to half the audio frequency, you can either double the decimation factor or half the mic clock;
  3. You can refer to this discovery kit part number --> STM32F4DISCOVERY, which implements the MP45DT02 audio processing in the STM32CubeF4 pack, in Projects\STM32F4-Discovery\Applications\Audio\Audio_playback_and_record folder. Btw, please note that all ST MEMS digital microphones are PDM microphones and can be managed at the same way at MCU level, so you can use also the NUCLEO family reference designs and expansion board such as X-NUCLEO-CCA02M2, which is a little more recent.

Regards

​thank you !!