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

APP Timer and While loop in BLE

Hi,

I am using App Timer for measuring time and at the same time while loop to check if the timer reached particular time.

I have noticed during while loop App Timer event doesn't seems to work. Is this correct?

Regards Siva

Parents
  • The app_timer uses RTC1 for all your timers, and always uses APP_LOW priority level. You should not configure RTC1 separately when using the app_timer. Also note that the SoftDevice uses RTC0, so you cannot use that from your application. My gut feeling is that you should clean-up your application, make sure not do unnecessary blocking stuff etc, rather than trying to fix too much with priorities. Do as little as possible in interrupt routines, only what must be done fast, and do the rest in main context. Use timers for waiting, not loops checking a timer value etc...

Reply
  • The app_timer uses RTC1 for all your timers, and always uses APP_LOW priority level. You should not configure RTC1 separately when using the app_timer. Also note that the SoftDevice uses RTC0, so you cannot use that from your application. My gut feeling is that you should clean-up your application, make sure not do unnecessary blocking stuff etc, rather than trying to fix too much with priorities. Do as little as possible in interrupt routines, only what must be done fast, and do the rest in main context. Use timers for waiting, not loops checking a timer value etc...

Children
No Data
Related