Bug: cmsis_os.c The implementation of osMessagePut() does not agree with description
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-08-16 1:08 PM
The comments for osMessagePut() match osMessageGet() and note that
* @param millisec timeout value or 0 in case of no time-out.
However
osMessagePut() does not return immediately when millisec ==0. The code that is in osMessageGet() to handle this case is missing from osMessagePut()
Suggest replacing:
ticks = millisec / portTICK_PERIOD_MS;
if (ticks == 0) {
ticks = 1;
}
with same code as the Get():
ticks = 0;
if (millisec == osWaitForever) {
ticks = portMAX_DELAY;
}
else if (millisec != 0) {
ticks = millisec / portTICK_PERIOD_MS;
if (ticks == 0) {
ticks = 1;
}
}
- Labels:
-
Bug-report
-
FreeRTOS
-
STM32Cube MCU Packages
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-08-17 8:28 AM
Hi @AWood.1 ,
Thanks for sharing your proposal, I submitted your request to our development team for farther checks.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
