Hi
What is the nRF5340 PDM frequency max and min can be set?
Because below is our microphone frequency spec., we want to set PDM frequency into like between 450~850KHz
Thank you
Poki

Hi
What is the nRF5340 PDM frequency max and min can be set?
Because below is our microphone frequency spec., we want to set PDM frequency into like between 450~850KHz
Thank you
Poki

Hello Poki,
Hi Asbjorn:
Thanks feedback
So what is the min PDM frequency?
Poki
Hi @PokiHuang For the nRF5340, the PDM peripheral is quite flexible and your target range (450–850 kHz) is supported.
nRF5340 PDM clock frequency range
According to Nordic’s PDM peripheral design:
Minimum PDM clock: ≈ 100 kHz
Maximum PDM clock: ≈ 3.25 MHz
So any frequency between 450 kHz and 850 kHz is well within spec.
How it’s configured
The PDM clock is derived from the 32 MHz HFCLK and controlled via:
PDM_CLKCTRL (clock divider)
PDM_RATIO (decimation ratio, typically 64 or 80)
This allows you to select PDM clock frequencies such as:
500 kHz
625 kHz
750 kHz
1.0 MHz
(and many others depending on divider settings)
Practical note
Most PDM microphones are happiest in the 0.5–1.0 MHz range, so your 450–850 kHz requirement is safe and common. Just ensure:
The microphone’s PDMCLK duty cycle requirement is met
The selected RATIO matches your desired audio sample rate
Conclusion:
Yes, the nRF5340 can be configured to operate with a PDM clock between 450–850 kHz without any issue.
If you want, I can help calculate exact register values for a specific PDM frequency and sample rate.
Hi,
Thanks for your feedback. I am checking this internally and will let you know if frequencies other than specifically mentioned here could be supported.
Best Regards,
Syed Maysum
Currently I am programming the PDM of nRF52840 and that seems to be identical to nRF5340.
But til now I could not find a formula to use PDMCLKCTRL as a divider for HFCLK. For me it looks like a kind of enumerator for a predefined list of dividers.
If a formula exists, I would like to test it. Although the values are not guaranteed.
Best regards,
Robert
My list of possible frequencies is as follows with PDMCLKCTRL,RATIO:
#define ScanFreq12500 0x08000000,1
#define ScanFreq12903 0x08400000,1
#define ScanFreq13333 0x08800000,1
#define ScanFreq15385 0x09800000,1
#define ScanFreq15625 0x08000000,0
#define ScanFreq16000 0x0A000000,1
#define ScanFreq16129 0x08400000,0
#define ScanFreq16667L 0x08800000,0
#define ScanFreq16667H 0x0A000000,1
#define ScanFreq19231 0x09800000,0
#define ScanFreq20000 0x0A000000,0
#define ScanFreq20833 0x0A800000,0
Update:
This was new for me, I detected it a few minutes ago:
https://docs.nordicsemi.com/bundle/ps_nrf5340/page/pdm.html
I will try the formula described there with the nRF52840.
But ... hint for calculation:
Using the formula in Figure 2. PDM clock frequency equation (in Master Clock Generator) in typical calculation environments (e.g. LibreOffice Calc) does not work correct because of their floating point base. I will try (later) with 64-bit integers in C/C++ on my PC. I do not know the resolution of integer calculation in #if-... statements of the compiler. So it may be another trap to use such statements for calculation.
Hi Robert,
You’re right that the PDMCLKCTRL formula is explicitly documented for the nRF53 series. For nRF52840, the Product Specification does not describe such a formula, and the PDM clock is only documented and tested at the predefined clock settings.
You may experiment with other values, but only the documented PDM clock configurations for nRF52840 are validated. Other frequencies are outside the specified operating conditions and are not guaranteed.
Best Regards,
Syed Maysum
It is very important, that not only the scan frequency is near to the expected value but also the integrated decimation filter guarantees the sampling criterion (Shannon).
Because there is no technical information about this, I will stick to the guaranteed counter values.
Thank you
Robert
It is very important, that not only the scan frequency is near to the expected value but also the integrated decimation filter guarantees the sampling criterion (Shannon).
Because there is no technical information about this, I will stick to the guaranteed counter values.
Thank you
Robert
Hi,
Yes, specified values are the best for getting the documented results.
Regards,
Syed Maysum