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;
}
}
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.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.