nRF52840 Clock Out Pin to check the output frquency

Hello Team, 

I am working with the nRF52840 microcontroller and I would like to know how to check the output clock frequency of the controller like any "Clock_OUT" pin present or can any GPIO's can be taken in consideration. I have gone through the nRF52840 datasheet, but I couldn't find any information on how to do this.

Could you please guide me on how to get this done on the nRF52840? And also are there any registers that I need to read or any APIs that I can use for this purpose?

Thank you 

Parents
  • Hi,

    There is no clock output pin. The closest you can get is to connect a TIMER to GPIOTE via PPI to toggle a pin at 8 MHz as shown in this thread. Even though the frequency is lower this is based on the same 64 MHz oscillator as all the other peripherals that use a high frequency clock, and the CPU.

    There are two high frequency clock sources, HFINT (which is used by default), and HFXO which is started as needed. The example in the thread I linked to starts the HFXO, but if you want to test with HFINT, you can comment out line 32-33.

Reply
  • Hi,

    There is no clock output pin. The closest you can get is to connect a TIMER to GPIOTE via PPI to toggle a pin at 8 MHz as shown in this thread. Even though the frequency is lower this is based on the same 64 MHz oscillator as all the other peripherals that use a high frequency clock, and the CPU.

    There are two high frequency clock sources, HFINT (which is used by default), and HFXO which is started as needed. The example in the thread I linked to starts the HFXO, but if you want to test with HFINT, you can comment out line 32-33.

Children
Related