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 ?
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