cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Smart Bluetooth

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
Reply
1 Solution
Employee

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
Reply
3 Replies
Employee

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
Reply
Moderator
Moderator

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
Reply
Employee

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
Reply