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

1ms tick function with system clock 16MHz ?

I made code like to below for using 16Mhz system clock.

/* Start 16 MHz crystal oscillator */ NRF_CLOCK->EVENTS_HFCLKSTARTED = 0; NRF_CLOCK->TASKS_HFCLKSTART = 1;

/* Wait for the external oscillator to start up */ while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0) { } NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;

after this routine, I would like to configure 1ms tick timer. I think that the 1ms tick timer seem to be made using timer interrupt(timerX_IRQn). So, Can I make the tick timer using 32.768Hz with system clock 16MHz? If this is possible, How can I make code?

I look forward to wait for your detailed guide.

Parents Reply Children
No Data
Related