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

Timer for 8 hours - NRF52

I need to turn off a GPIO after 8 hours of it being triggered. I was reading about changing the prescaler to allot for 8 hours. I did the calculations and came up with a prescaler of 56 which would give me just over 8 hours max time (8.106 hrs).

I am also using BLE, app_button, and app_timer in my project. The app_timer i am using is driving a dual digit 7 segment LED display - that timing is fairly quick to switch displays so your eyes can't see it changing digits and appears to not flicker (0 prescale and timer setting of 10 in the app_timer_start settings)

Is there another way I can calculate 8 hours without changing the prescaler and affecting my other timings? Is there another timer that can do longer time?

I appreciate your help.

Parents Reply
  • Thank you to both that answered. I added another timer that I start when I need it that triggers every 1 minute. When the timer triggers, it increments a variable. I then check to see if the variable is 480 (8*60) and then it shuts off the GPIO. I can't believe that I didn't think of doing this myself. Sometimes, I make things more complicated than they need to be. Thanks again.

Children
No Data
Related