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

"Best method" for avoiding overflow of app_timer

I will use the functions in app_timer to set a timer to fire every 3 seconds. I want this to occur "forever" (e.g.until a restart of the nRF51).

To avoid a timer overflow, is it a better practice to set the PRESCALAR to 0 and clear the timer after each interrupt, or set the PRESCALAR to a higher value and check within the interrupt for a near overflow and clear the timer at that point? If one is better than the other - why is that so?

(thank you)

Related