nRF54H20 PDM DMIC only records noise.

Hi, 

We are almost ready with our first board around nRF54H20, only one issue is remaining. We have prepared a sample, that records PDM audio as PCM wave, and stream it over UART, and a python script to assemble and save it as wav file, to play and test.

1. We tried on-board PDM (CLK->P1.1 and DATA=>P1.4), and we are only getting white noise.
2. Then we tried external DMIC , (CLK->P2.2 and DATA=>P2.5), and getting same white noise.
3. Then we added support for nRF5340DK and tested same external DMIC, and both samples and DMIC is working as expected. (This step verifies DMIC and Sample)


Following is the overlay we are using with our custom board.
- if we use cpuapp_dma_region as memory-regions, then sample fail at memory allocation
- if we use "PCLK32M_HFXO" just like nRF5340 we get failed to request clock error in driver

&pinctrl {

	/omit-if-no-ref/ pdm0_default: pdm0_default {
		group1 {
			psels = <NRF_PSEL(PDM_CLK, 2, 2)>,
				<NRF_PSEL(PDM_DIN, 2, 5)>;
		};
	};
};

dmic_dev: &pdm0 {
	status = "okay";
	pinctrl-0 = <&pdm0_default>;
	memory-regions = <&dma_fast_region>;
	pinctrl-names = "default";
	clock-source = "PCLK32M";
};



  •  
    we have got our latest revision board using nRF54H20, and the only thing pending is DMIC. Do we have any update on this?
    we are planning to file an upstream PR for our board as soon as possible

  • Hi

    Susheel is out of office, so I'm trying to get a grip of DMIC on nRF54H20 in his absence. The audio team has not worked on DMIC on the nRF54H20 yet, so the feature is not fully implemented yet, and so the support is only experimental yet.

    Some general notes on what you can try:

    Use a logic analyzer on the pins to ensure clocking and data output is within the microphone's specifications. You can also try to have no data in to the SoC (break and ground the data lines to see if you then get silence, or if there's still noise). 

    I'll try do some more digging, but can't promise anything soon I'm afraid. Thank you for your patience.

    Best regards,

    Simon

  • Anuj,

    I have not worked on DMIC before, but it does not look like the issue is with the nRF54H if you could make it work with nRF53.

    When I look into nrf/tests/drivers/audio/pdm_instances/boards/nrf54h20dk_nrf54h20_cpuapp.overlay there is a comment saying that for best performance the PDB_CLK should be on the clock pin. I think if you use some other pin , then the clock is redirected to a non optimum performance. I am suspecting that using PDM_CLK on different pins might be coming with some timing jitter and hence causing only noise to appear.  

    On your custom board, please try the same pins P1.2 for testing to see if that can help?

    Another thing that I assume you have tested both non cacheable cpuapp_dma_region and cacheable dma_fast_region.

    That said, we do not seem to be actively working to make the DMIC work internally on nRF54H apart from the test of dmic buffer dump tests,  Have you tried to run the test nrf/tests/drivers/audio/dmic_dump_buffer/src/main.c that seems to have nRF54H_DK boards as supported board. I think we need to spend time to port the DMIC sample to work on nRF54H which we have not done yet. Please talk to your Regional sales manager if you want this porting work of that sample on nRF54H to be prioritized.

Related