I have some troubles to understand the system clock functionality. I am using a Module from Rigado which uses the nRF52 and has an external 32Mhz osc. on board.
In the nrv_drv_config.h file follwing value is set for the HFCLK controller.
#define CLOCK_CONFIG_XTAL_FREQ NRF_CLOCK_XTALFREQ_Default
If I understand it correctly this should equal a system clock of 64 Mhz. However, in my main loop I have nothing else than nrf_gpio_pin_toggle(LED_4);
No interrupts are used and no Softdevice is running.
The frequenzy I get on the LED pin is about 300 Khz.
Can anyone explain why it is only 300 KHz I would have expected something around a few MHz.
I run into this problem because I was debugging a problem where the processing of COMP interrupts took to long and I wanted to make sure that the nRF52 is running as fast as possible.
so two questions:
- Why is the pin toggle frequency so low ?
- How do I change the system clock from ?
thanks in advanced best, Timur