cancel
Showing results for 
Search instead for 
Did you mean: 

Issue using osThreadFlagsWait() function

aahsan
Associate III

Trying to use osThreadFlagsWait() in my command handler for command processing thread to save CPU utilization and seeing issue where system gets stall.
====================
while (1) {
  int cnt = getcmd();
  if (cnt >= 0) {
    process_command();
  } else {
    osThreadFlagsWait(0, osFlagsWaitAny, DELAY_TASK_10MS_TICKS);
  }
}
====================
without using osThreadFlagsWait() command line processing is ok, when osThreadFlagsWait() used to save CPU utilization system gets stalled.

@Tesla DeLorean 
I was wondering if there is anything special which needed to be taken care while using this function.

Thanks in advance for your support!

0 REPLIES 0