Oras
Oras

Reputation: 124

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!

Upvotes: 1

Views: 624

Answers (1)

Oras
Oras

Reputation: 124

Thanks 0___________

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

Upvotes: 1

Related Questions