cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Smart Bluetooth

New Contributor II

Hi,

As a follow on to this older closed thread: where is int main(void) located?

Is it possible to do a while(1) in the create function for my machine state?

If not, In my application I need machine state (my BCM20736 use lot of GPIO, UART, BLE ... and I need to do a properly exploiation because I have multiple mode of user case).

Is there a way to implement a state machine?

For now, to try, I do this in a timer 1ms but it's not fast enough...

Thanks for the answer

0 Likes
Reply
1 Solution
New Contributor II

I try with a timer but it's not fast enough. Same problem with library bt_clock_based_periodic_timer_Enable(...).

I need periodic timer 1ms for timing state and a second timer for my machine state but  the txo timer have a period too close and it's work badly...

Finally, I do this without machine state now. It's more difficult to code but it's works!

It's too bad with can't use a while(1) loop.

Thanks for the support

View solution in original post

2 Replies
Moderator
Moderator

Hi :

   We have a timer api which is defined in wiced_bt_app_common.h , and can define a timer with second timeout , fine timer with ms timeout,  Can you consider to use the timer to control your machine state ?

0 Likes
Reply
New Contributor II

I try with a timer but it's not fast enough. Same problem with library bt_clock_based_periodic_timer_Enable(...).

I need periodic timer 1ms for timing state and a second timer for my machine state but  the txo timer have a period too close and it's work badly...

Finally, I do this without machine state now. It's more difficult to code but it's works!

It's too bad with can't use a while(1) loop.

Thanks for the support

View solution in original post