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

How to set a 12-hour timer in S110

Hello,

[Device: nRF18522 S110 Softdevice 8.0.0 SDK10]

I've referred to this post:

devzone.nordicsemi.com/.../

Does it mean the maximum value is 512 seconds for prescaler of 0?

However, I want to set a 12-hour timer to monitor battery level in order to save the power consumption. Is it possible to set the 12-hour timer?

Thanks for your help in advance.

Sara

Parents
  • Yes the max value is about 512 seconds for a prescalar of zero, because the timer counts to 2^24 at 32,768Hz and 2^24/32,768 = 512.

    If you want longer, don't use a prescalar of zero.

    As usual this is in the nRF51 reference manual, section 19.1.2 which gives you the max times for various prescalars. It goes all the way up to 582.542 hours, or just over 24 days.

    Or you could just wake up every 512 seconds and count 1 until you reach 12x60x60/512 = 84 and a bit, then you have 12 hours.

Reply
  • Yes the max value is about 512 seconds for a prescalar of zero, because the timer counts to 2^24 at 32,768Hz and 2^24/32,768 = 512.

    If you want longer, don't use a prescalar of zero.

    As usual this is in the nRF51 reference manual, section 19.1.2 which gives you the max times for various prescalars. It goes all the way up to 582.542 hours, or just over 24 days.

    Or you could just wake up every 512 seconds and count 1 until you reach 12x60x60/512 = 84 and a bit, then you have 12 hours.

Children
Related