cancel
Showing results for 
Search instead for 
Did you mean: 

wrong return value for osSignalWait ?

Katzenberger.Michael
Associate III
Posted on October 17, 2016 at 21:38 Hi ! I'm using freeRTOS with STM32CubeMX. While playing with signals for inter-thread communication I came across the different return value of function osSignalSet() The CMSIS standard states:

int32_t osSignalSet(osThreadId thread_id, int32_t signals)
Parameters
[in] thread_id thread ID obtained by osThreadCreate or osThreadGetId.
[in] signals specifies the signal flags of the thread that should be set.
Returns
previous signal flags of the specified thread or 0x80000000 in case of incorrect parameters.

But STM32CubeMX creates:

/**
* @brief Set the specified Signal Flags of an active thread.
* @param thread_id thread ID obtained by \ref osThreadCreate or \ref osThreadGetId.
* @param signals specifies the signal flags of the thread that should be set.
* @retval osOK if successful, osErrorOS if failed .
* @note MUST REMAIN UNCHANGED: \b osSignalSet shall be consistent in every CMSIS-RTOS.
*/
int32_t osSignalSet (osThreadId thread_id, int32_t 

signal

)
And indeed the only return values are osErrorOS (=255) or osOK (=0) ! Same applies to function osSignalClear() Bug or feature ??? 😉 Best regards, Michael. #stm32cubemx #stm32cube-free-rtos-cmsis
3 REPLIES 3
Imen.D
ST Employee
Posted on October 31, 2016 at 10:34

Dear User,

Thank you for highlighting this issue.

Please note that your feedback is reported internally and it is under review.

Best Regards

STM32.forum

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Jeanne Joly
Senior III
Posted on January 09, 2017 at 16:34

Hi

Katzenberger.Michael

,

Your bug has been solved and will be delivered in CubeMX4.

BR.

Eric Dampierre

Posted on January 10, 2017 at 11:46

Hi again

Katzenberger.Michael

,

For your information, I have a recent update from our development team and the bug will be delivered in CubeMX4.21 (instead ofCubeMX4.20).

BR. Eric Dampierre