nRF5340 PDM frequency max and min?

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

Parents
  • Hello Poki,

    • The nRF5340 supports Pulse Density Modulation (PDM) and can generate the PDM clock. However, based on the information provided in the nRF5340 Product Specification and nRFx PDM HAL, the maximum PDM clock frequency supported is 1.333 MHz. 
    • The nRF5340 supports a selectable ratio of 64 or 80 between PDM_CLK and output sample rate as per the PDM Product Specification. However, given the maximum PDM clock frequency of 1.333 MHz, the maximum achievable sampling rate would be approximately 20.8 kHz (1.333 MHz / 64) 
    • The amount of RAM and flash required to store 80 kHz data for 1 second would depend on the bit depth of the data. For example, if each sample is 16 bits (2 bytes), you would need approximately 160 KB of memory (80,000 samples/second * 2 bytes/sample) to store 1 second of data
      This is a copy of the answers supplied in the DevZone ticket here, but still valid in your case:  Maximum PDM clock frequency supported by nRF5340 
      Best regards
      Asbjørn 
  • 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 

Reply Children
No Data
Related