Hi everyone, happy new year!I have a RTX V5 thread flag related issue:In my program, TaskA needs to wake up TaskB frequently under certain circumstances. TaskB is a low-speed device (LED blinks). In this case, what adverse effects does TaskA frequently call osThreadFlagsSet?I always feel that this is not very good. Is there any good way for you to "synchronize low speed threads with high speed threads"? Thank you !
Code show as below:
Note: TaskA has higher priority than TaskB.
void TaskA (void *argument) { static uint32_t flags; while(1) { // Alarm generated every 10ms flags = osThreadFlagsSet(ThreadIdTaskB, 1); osDelay(10); } } void TaskB (void *argument) { static uint32_t flags; while(1) { flags = osThreadFlagsWait(1, osFlagsWaitAny, osWaitForever); LED(1); osDelay(500); LED(0); osDelay(500); } }