Search code examples
tasksignalsstm32reset

STM32 FreeRTOS, How To Clear Task Signal Flag


I have a task that handles several operations by the id of signal flag.

Those flags don't reset at the end of the operation ( it's running in an infinite loop and waits for the next signal).

    for(;;)
    {
        signalWaitEvent = osSignalWait(0, osWaitForever);

        
        if( signalWaitEvent.value.v == 0x10 )
        {

              // Some magic

        }
        else if( signalWaitEvent.value.v == 0x15 )
        {
           // Some magic
        }
    }

As I not from the STM form, the osSignalClear function wasn't implemented.

Is there any way around it?

Thanks all!


Solution

  • Thanks 0___________

    I replaced the CMSIS function osSignalWait with FreeRTOS ulTaskNotifyTake and it's working now.