cancel
Showing results for 
Search instead for 
Did you mean: 

Not receiving valid PDM data from MP34DT06J

TomLillie
Associate II

Hi,

I have spent the last 2 weeks working on a project with the STM32F102CBT6 that includes the MP34DT06J MEMS microphone, but so far I have been unable to get it to output a valid PDM data stream. I have tried using both the SPI1 in master receive mode, as well as generating a 2MHz clock signal using the TIM2 channel 2 PWM functionality, but in both cases reading the DOUT pin of the mic shows an occasional spike, but no real data. There is the exception that within the 1st 20ms of powering up the device it appears to be outputting data, but then it returns to a seemingly idle state. For the mic I've connected pin 1 to 3.3V, pin 2 to ground, pin 3 to pin PB3 of the STM, and pin 4 to pin PB4 of the MCU. Has anyone run into this problem before?

8 REPLIES 8
Federica Bossi
ST Employee

Hi @TomLillie ,

Welcome to ST Community!

Just some questions to better understand your problem: can you share with us a screenshot of the clock and data acquired with the oscilloscope? Have you already tested another microphone?

Finally, did you use the libraries in X-CUBE-MEMSMIC1?

In order 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.

Hi, here is the response when running the device with a 2MHz clock. I seem to only be getting a response every 30 to 40 us, so when I capture the data and apply a decimation factor I'm left with a particularly small data set, which when played through audacity just sounds like noise. However, when I initially start up the device I'm getting a much denser output (see osc_3), and the device seems to operate quite normally for about 25ms, before returning to an idle state, as shown in osc_1 and osc_2. I'm at a bit of a loss as to why I'm getting such erratic behavior, are there any obvious errors that I should be checking for?

I have been using the STM32Cube PDM2PCM software library, with the pdmtopcm_glo.h file.

niccolò
ST Employee

Hi @TomLillie ,

just to check: did you set the connections between Vdd and GND as in the figure 4 of the datasheet?

niccol_0-1690879333573.png

also, can you try to increase or decrease the clk frequency and share the resulting signal?

Niccolò

Hi, here is the schematic and the device response at 1MHz

Device response at 4MHz

Device response at 500kHz. All tests seem to show a similar response which I am failing to understand.

niccolò
ST Employee

Hi @TomLillie ,

I see some issues in the schematic: 
you put 100 nF and 10 uF from Vdd to GND, while the recommended is 100 nF and 1 uF
also, the 10k R from LR to GND should not be useful
I'm not sure if the reason for your problem can be that, but maybe you can also keep track of the Vdd line to check if the mic is powered up or not during operations

Niccolò