This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PDM peripheral's sampling rate at clock rate of 1.032 MHz

I'm using the nRF52840 and the PDM peripheral. The sampling rate at a clock rate of 1.032 MHz is 16kHz per the documentation. I want to make sure I understand the difference between the PDM clock rate and the effective PDM sample rate Am I right in thinking that the maximum sound wave frequency I can measure is then limited to 8 kHz? If that is correct thinking, is there any thing I can do to increase the sample rate other then utilizing undocumented/non-guaranteed nrf_pdm_freq_t values that I place in the /modules/nrfx/hal/nrf_pdm.h file?

  • Hi

    The PDM sample rate is limited to 16kHz which as you say limits the audio frequency to 8kHz (normally a bit less as you need to filter the sound signal to avoid aliasing). 

    The main use case for the PDM interface is for handling voice input (remotes with support for voice commands for instance), and for this purpose 8kHz audio is sufficient. 

    If you need a higher sample rate I would recommend finding a microphone or ADC with I2S output instead, as the I2S interface supports sample rates up to 48kHz. 

    Best regards
    Torbjørn

  • Hi Torbjørn,

    Would you or your colleagues please explain in more detail what might limit the PDM sample rate to 16kHz?  There are different statements on the forums that contradict this, and at face value we have had good results using 20kHz and even higher.  However your statement that only 16kHz is supported has caused some of our team to be concerned that we are using the wrong approach. 

    If you try to use a different clock speed (than 1.032MHz or 1.280MHz, for 64 or 80 oversampling ratio) is there likely to be a problem in the actual acquisition of the PDM data, e.g. the decimation filter will not be able to keep up?

    If you use different clock speed or, say, 1.280 MHz with oversampling ratio of 64 to get a sampling rate of 20 kHz, could there be a performance issue that causes an exception/crash?

    Some PDM microphones have different power / performance regimes wherein e.g. higher or lower frequencies should be used to attain different performance goals, so it is important to understand what the nature of the limitations in the nRF52840 are.  In other posts your team has indicated that the PDM functions in the nRF53840 are the same as in the nRF52840 (at least to some degree) and the recommendations for the nRF53 are more permissive.  Is it simply that Nordic has only tested thoroughly for some combinations of parameters, but there are not fundamental reasons to limit customers to using those parameters?

    Thank you,

    --Allen

Related