Logic in osEventFlagsSet() for xEventGroupSetBitsFromISR() return appears to be inverted #6
Labels
internal bug tracker
Issue confirmed and reported into a ticket in the internal bug tracking system
mw
Middleware-related issue or pull-request.
rtos
RTOS-related issue or pull-request
wontfix
This will not be worked on
Projects
Set-up
STM32F205 project on custom board using STM32Cube FW_F2 1.9.2 with FreeRTOS middleware enabled (using CMSIS RTOS v2).
Issue
When program comes to execute
osEventFlagsSet()
from within an ISR, it returnsosFlagsErrorResource
after the flag has been created through the IOC editor.Under investigation, it seems that the logic in the aforementioned function for handling the return value of
xEventGroupSetBitsFromISR()
may be inverted. WhenpdPass
is returned to indicate a successful addition of the message to the queue internally, the resonse of the calling function is to report an error, which should be the response topdFail
.As a comparison,
osEventFlagsClear()
callsxEventGroupClearBitsFromISR()
, but returns the error if the return value ispdFail
.Checking the example code published by FreeRTOS,
!= pdFail
test is used to trigger the yield, therefore I think the behaviour should be as follows:Thanks for the help. I've check that this is still the case in the latest commit to master and can't find anything else about it. If this is the wrong forum for this suggestion please let me know.
The text was updated successfully, but these errors were encountered: