Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

app_timer with scheduler

I want to use nested app_timer instances:  I am gathering data on a repeating app_timer (app_timer_1) which fires say every 10ms.  One of my sensors providing the data requires some time delay between requesting the data and it being ready, so I want to use a second app_timer (app_timer_2) to provide a low-power delay function. The delay can be of the order of 5ms.

Since app_timer_2 is being stated from app_timer_1 it isnt running because they have the same interrupt priority but timer_2 is running in the context of timer_1.  I believe the way to get around this is to use the scheduler.  However despite spending some time searching I cant find any examples of how to do this.  Documentation seems a bit sparse, and in places confusing.

For example, app_timer use in scheduler example here: https://devzone.nordicsemi.com/tutorials/b/software-development-kit/posts/scheduler-tutorial uses deprecated functions: app_timer_appsh no longer exists (I am using SDK 14.2).

Any help much appreciated!

Parents Reply Children
No Data
Related