nrf5280 with PDM interface

I tried implementing a PDM interface for recording sound from a microphone on the nrf52840. For this purpose, I used the official example which is accessible at github.com/.../main.c.

In my first attempt, I added PDM functionality to my actual program. I did not get any errors, everything worked just fine. The actual PDM_CLK frequency was 1.28 MHz, but recorded data from the PCM interface, shown in Audacity, was noisy without any useful sound signal. I tried to change some settings but without success.

In the second attempt, I took just a clean sample (link attached above) changed the PDM pins, and compiled. Similar to the first case, I did not get any error, but PDM_CLF frequency was not generated at all, which corresponded to the obtained signal

I am wondering if the official example is appropriate for the implementation of PDM functionality.  I do not know what I am doing wrong. I would appreciate any help.

Related