Skip to main content
Visitor II
July 27, 2023
Question

Not receiving valid PDM data from MP34DT06J

  • July 27, 2023
  • 3 replies
  • 11141 views

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?

    This topic has been closed for replies.

    3 replies

    Technical Moderator
    July 28, 2023

    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?

    TomLillieAuthor
    Visitor II
    July 31, 2023

    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?

    ST Employee
    August 1, 2023

    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ò

    TomLillieAuthor
    Visitor II
    August 1, 2023

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

    TomLillieAuthor
    Visitor II
    August 1, 2023

    Device response at 4MHz

    ST Employee
    August 3, 2023

    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ò