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,
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
Hi,
Yes, specified values are the best for getting the documented results.
Regards,
Syed Maysum
Hi,
Yes, specified values are the best for getting the documented results.
Regards,
Syed Maysum