PDM / DMIC not giving any sensible output

I'm trying to capture audio data from a PDM microphone.
Using the dmic sample I output the captured buffer via serial. Though the captured PCM data is 8x the same data. So each time the dmic sample captures one "block" is receives the same data though this is not what I see in my logic analyser.
What is even more puzzling is that I keep getting successful data reads when I disconnect the microphone. That happens with the unmodified dmic sample.

The issue sounds very similar to this old ticket: RE: Trouble extracting data using DMIC 

Used hardware:
nrF5340DK
Microphone: https://www.adafruit.com/product/4346 ( https://cdn-learn.adafruit.com/assets/assets/000/049/977/original/MP34DT01-M.pdf)

Software:
NCS2.5.0 via VSCode Extension
Windows 10

The received output. 1. Zoomed in 2. Full capture

Parents Reply Children
  • ah I just realize you are the same person with that other similar ticket Slight smile
    I'm actually using a modified version of the code you had posted, thanks for that, it helped me get a bit further with this.
    My pops are a bit more aggressive than the pcm sample you had posted so I figured that might be related to reading too much data maybe and getting a few random bytes in there.
    Thats unfortunate that you still get the pops if you don't stop the stream at all. Altho I guess the memory slab could still contain some "off bytes" if the dmic driver isn't completely filling it for some reason or notifies too early.
    I did see a notice about a workaround to get rid of click sounds in the Thingy:53 firmware. Let me see if I can find that again.

  • Ah found it but it unfortunately suggest that the click is something that happens once when the interface is started, so if you don't stop it again I would expect the pop to not re-appear :/
    github.com/.../ei_microphone.cpp

Related