CMSIS RTOS feature osSignal incorrectly implemented on FreeRTOS
Hi,
I was checking through the implementation of osSignal in the file installed by STM32CubeMX to 'Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.c'
The
http://www.keil.com/pack/doc/CMSIS/RTOS/html/group__CMSIS__RTOS__SignalMgmt.html
specifies that the call to osSignalWait will 'Suspend the execution of the current
runningthread until ALL specified signal flags with the parametersignalsare set.'This is exactly the behavior of the FreeRTOS function
http://www.freertos.org/xEventGroupWaitBits.html
. However, in the osSignal implementation, the FreeRTOS primitive 'TaskNotify' is used. As noted onhttp://www.freertos.org/RTOS_Task_Notification_As_Event_Group.html
, 'Unlike when using an event group the receiving task cannot specify that it only wants to leave the Blocked state when a combination of bits are active at the same time. Instead the task is unblocked when any bit becomes active, and must test for bit combinations itself.'This means that the osSignal functionality does not behave as specified.
Please let me know if I have misunderstood the situation, or please let me know how this can be fixed?
Cheers,
Oskar
#cmsis-rtos #freertos