NRF5340 PDM (dmic) unresponsive

Im running the DMIC example on a NRF5340 custom board - uses an ISP2053 module (it's a high-quality module). Can confirm the pcb/ parts are ok. I successfully got audio a couple of times, checked it, it was ok.

However, the behaviour is hair-pulling-worthy at best. Same piece of software ran 10 times only produces audio a couple of times. Mostly it just outputs:

[00:00:01.037,109] <inf> dmic_nrfx_pdm: PDM clock frequency: 1536000, actual PCM rate: 24000
0 0 0 0 2 -45 -46 -93
74 74 74 74 74 74 74 74
7 7 7 7 7 7 7 7
7 7 7 7 7 7 7 7
7 7 7 7 7 7 7 7
7 7 7 7 7 7 7 7
7 7 7 7 7 7 7 7

[00:00:01.536,163] <inf> dmic_nrfx_pdm: PDM clock frequency: 1280000, actual PCM rate: 16000
0 0 0 0 2 -61 -56 -119
74 74 74 74 74 74 74 74
7 7 7 7 7 7 7 7
7 7 7 7 7 7 7 7
7 7 7 7 7 7 7 7
7 7 7 7 7 7 7 7
7 7 7 7 7 7 7 7
7 7 7 7 7 7 7 7

Those being the samples. And every time there's the same dreaded "7". What the hell does that mean?! (Is it God's way of saying I should become an influencer or something?)

I did a full erase. Flashed the board again. It worked. Got audio. Touched *nothing*. Simply let it run for 10-20 seconds, flashed it again. The above output. I'm really at a loss. It's the basic dmic sample, i tried running at 16khz, 24, 32, 48. Initially, it worked at 48khz (which, while undocumented, is achievable and should be stable). However, not even 16 works anymore.

Has anyone hit this bump? Im supposed to hand the project over next week and the easiest part of the project, the dumbest, easiest part imaginable is absolutely mocking me :))

Please help! I feel like crying.

On a more serious note, the pdm mic is running on ACLK. I haven't seen any defines/ special stuff in the sample. So I figure the driver takes care of starting the clock. Is there something I'm missing?

EDIT:

ACLK is apparently not playing nice with 48khz sample rate. once engaged, even if reflashed with a different sample rate, it will always output junk until the next power cycle. Simply resetting the board does not cut it. In case someone stumbles upon this. 

Parents Reply Children
No Data
Related