fine timer priority

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I was wondering to use the fine timer for a timeout on a while loop, but I experienced that the fine timer callback is not called while in the loop. What's the priority above the user code?

0 Likes
1 Solution

finetimer callback happens in the application thread (the timer ISR serializes an event to the application thread). So, unless you exit the while loop, the app thread will not be able to go back to the top of its loop to pick up fine timer expired event from its message queue and call the callback.

View solution in original post

0 Likes
3 Replies
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

The fine-timer has a resolution of 12.5ms and it is the preferred timer as it consumes less power.

Check out this thread Can we implement main loop to run application code?

0 Likes
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Here's a few additional Fine Timer threads I found which may help as well:

Re: [20736]Fine timer fires during sleep ?

Re: Change in fine timer behavior from 1.x to 2.x SDK

Re: FineTimer

0 Likes

finetimer callback happens in the application thread (the timer ISR serializes an event to the application thread). So, unless you exit the while loop, the app thread will not be able to go back to the top of its loop to pick up fine timer expired event from its message queue and call the callback.

0 Likes