Hi I am working with nRF52840 , since it is said that it can work on 64Mhz, i just want to confirm by using Oscilloscope.
You have any inputs that how i can check the frequency accurately?
Thanks and Regards R Madhu.
Hi I am working with nRF52840 , since it is said that it can work on 64Mhz, i just want to confirm by using Oscilloscope.
You have any inputs that how i can check the frequency accurately?
Thanks and Regards R Madhu.
Hi,
The best way is probably to use a timer, PPI, and a GPIOTE channel to toggle a pin. The Timer base frequency is 16MHz so that means you can toggle a pin at 16MHz, and get an 8MHz signal out that you can measure on. The timer and CPU use the same system clock so this should give you what you need.
Thank you Martin, I have toggled an LED directly writing in to the registers, putting in a while loop and I am able to see 16MHz clock. But how can I make sure that HFCLK of 64MHz is enabled or not??
You mean how you can see if it is the internal RC oscillator or the external crystal that is running? You will probably see a significant deviation from 16.000Mhz on your LED pin when running on the RC oscillator, while the crystal should be quite accurate. You can also read the NRF_CLOCK->HFCLKSTAT register to see which clock source you are using. One of them is always being used when the CPU is doing something.