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

APP TIMER configurations

Hi. I am using two application timers in my program, one timer ticks is fixed to 1000 means it will call its handler every second. The other timer ticks values I am changing so that I can call that timer handler at different specific times. Both the timers are working perfectly. However, I want the have the other timer handler to be called after a long delay, for example 15 hours. There is a prescaler value that is 12 bit value which can be changed to get me different times. I think app timer works with 32768 hz clock, and I know the below formula

(2^24) * (APP_TIMER_PRESCALER+1) * 1000 / 32768 = 8 192 000ms = ~136,5 minutes. when prescaler is 15, it will give me 136 min, and if I change the prescaler
to 4096, it will give me 582 hours. Is it right?

How can I change the prescaler value? Also, does changing the value affect my other parts of the program or the other 1 sec timer?

I appreciate your suggestions.
Regards,

Related