Closed fronders closed 3 years ago
Hi @fronders,
Thank you for this report. It will be forwarded to our development teams for analysis. We will be back to you as soon as we get an answer.
Thank you for your patience and thank you again for your contribution.
With regards,
Hi @fronders,
this is indeed a bug! and will be fixed in the next release.
regards Haithem.
Hi @fronders
It seems that the bug was fixed in the official CMSIS-FreeRTOS repo. (check here)
We are planning to update the STM32CubeFW with the latest CMSIS-FreeRTOS release to integrate the fix.
regards Haithem.
I think we can close this issue now.
regards Haithem.
Reopened till a new STM32CubeL4 firmware version supporting FreeRTOS v10.3.1 is published.
Hi @fronders,
The fix you requested has been implemented and is now available in the frame of the STM32CubeL4 FW V1.17.0 package where we have upgraded to use FreeRTOS V10.3.1 version.
This issue can be closed now. Thank you again for your contribution.
With regards,
The set-up
Description of the bug Incorrect implementation of
osFlagsWaitAll
option forosEventFlagsWait()
is causing incorrect code functioning. When usingosEventFlagsWait()
function withosFlagsWaitAll
I expect that the thread calling gets unblocked when all of the specified flags are set. However if any other flags (additional to specified) are also set -osEventFlagsWait()
returns withosErrorTimeout
. This happens even withosWaitForever
timeout, which is nonsense.Problem lies in the ST's wrapper around FreeRTOS function
xEventGroupWaitBits()
. If more flags then specified are set - the function will report error, which shouldn't happen.Specifically this check on cmsis_os2.c line 1179 is causing the bug. Here is the piece of code around those lines:
Proposed solution Replace the buggy condition check:
with a correct one:
-- Same problem is observed with STM32CubeF4 v1.25.0 pack and many others since they contain CMSIS-RTOS v2.00 Middleware implementation as well.