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

Decrease the timer resolution of SDK 14

How can we decrease the resolution of the timer to 500 ms in SDK 14? The minimum resolution I could get to was 1 ms by changing the APP_TIMER_CONFIG_RTC_FREQUENCY macro to 31. 

Thanks

Atul

Parents
  • The RTC peripheral has a 12 bit prescaler. So the max value for prescaler will be (2^12) - 1 = 4095. This will give you a counter resolution of 125 ms with an overflow of 582.542 hours.

    If you want the l̶o̶w̶e̶s̶t̶ highest counter resolution, you can set the prescaler (APP_TIMER_CONFIG_RTC_FREQUENCY) to 0. This will give you a counter resolution of 30.517 us and an overflow of 512 seconds.

Reply
  • The RTC peripheral has a 12 bit prescaler. So the max value for prescaler will be (2^12) - 1 = 4095. This will give you a counter resolution of 125 ms with an overflow of 582.542 hours.

    If you want the l̶o̶w̶e̶s̶t̶ highest counter resolution, you can set the prescaler (APP_TIMER_CONFIG_RTC_FREQUENCY) to 0. This will give you a counter resolution of 30.517 us and an overflow of 512 seconds.

Children
Related