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

APP timer bugs?

Hi all,

i developer a code that :

  1. press button short switch on one led
  2. Press button long switch on two led.

but sometimes if i press the button a two led switch on, the device made this for few minutes and after reset the device.

If i debug it i see that the timer of long press expires :( Maybe a bug about the app timer? (devzone.nordicsemi.com/.../).

Someone can help me?

Thanks, Anna

Parents
  • I don't see any reason why that code should cause any problems for app_timer. It is only incrementing a variable counting overflows right before the counter would overflow and restarts the counter. However, if you do not need the full resolution of the RTC (~20µs), you can use the PRESCALER to allow it to run for up to 582.542 hours without overflowing (giving you a resolution of 125ms). Is the button presses working as expected if you no not start the app timer?

Reply
  • I don't see any reason why that code should cause any problems for app_timer. It is only incrementing a variable counting overflows right before the counter would overflow and restarts the counter. However, if you do not need the full resolution of the RTC (~20µs), you can use the PRESCALER to allow it to run for up to 582.542 hours without overflowing (giving you a resolution of 125ms). Is the button presses working as expected if you no not start the app timer?

Children
No Data
Related