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

freedom pdm clock set

i have used 52832 for pdm clock generater, but i just can set the frequecy to fixed such as 1.032 MHz,1.067 MHz.., if i want to set the frequecy to 1.050MHz, i can't come true, the frequecy aslo is 1.032 MHz or 1.067 MHz, i have looked the PDMCLKCTRL regesiter, whether the Value is 0x08890000 or 0x08950000, the output frequecy is same(1.103MHz), Why? How to set the frequecy to 1.050MHz or 1.080MHz and other freedom frequecy?

  • Hi,

    Only the values listed in the PS have been fully and thoroughly tested. If you are using values that are not listed in the PS, we cannot guarantee that they will work and it will be on your own risk.

    With that said, you should be able to set the clock to a different frequency, e.g. PDM_CLK = 32 MHz / 26 = 1.231 MHz -> use NRF_PDM->PDMCLKCTRL = 0x09800000; before you start the PDM.

    But, you will not be able to fine adjust the clock frequency, since the PDM clock generator does integer division based on the HFCLK. You can therefore not set the PDM clock 100% freely. Some additional values are listed for the nRF52840, see this link.

Related