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

Smart Bluetooth Forum Discussions

Anonymous
Not applicable

I want to implement while loop and call application code functions at specific times. Use fine timer as time reference to execute specific function.

Core_OS_Scheduler.png

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

I checked with the developers and unfortunately, this is not possible  because the application runs in its own thread and the entire application framework is event driven.

See this thread for more details: Re: where is int main(void) located?


View solution in original post

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

I checked with the developers and unfortunately, this is not possible  because the application runs in its own thread and the entire application framework is event driven.

See this thread for more details: Re: where is int main(void) located?


0 Likes
Anonymous
Not applicable

Can we put while loop at the end of application create function and pet the watchdog. Below is the implementation

while (1)

{

     Get native clock count (325usec) and timers uses native clock count

    

     if (timer1_expired)

     {

          execute scheduler function1;

     }

    

     if (timer2_expired)

     {

          execute scheduler function2;

     }

     if (timer3_expired)

     {

          kick watchdog;

     }

}

0 Likes

Then none of the Bluetooth functionality will work because you will not be letting other parts of the system run their state machines (that run in other thread contexts).

Anonymous
Not applicable

Other than fine and regular timers what other resources available for application. Can you provide us contact number for quick discussion and we are struck with no other options.

0 Likes