cancel
Showing results for 
Search instead for 
Did you mean: 

freertos cmsis_os2 osTimerStop returns osErrorResource (stm32l431 + STM32CubeIde)

MLe M.1
Associate II

Hello,

With freertos cmsis_os2 osTimerStop() returns osErrorResource despite timer is running and trigs the callback after the correct time.

Is there a known bug?

How a timer returning pdFALSE at test xTimerIsTimerActive (hTimer) can trig a callback???

How can I stop the timer otherwise?

Best regards

Mich

1 REPLY 1
Sarra.S
ST Employee

Hello @MLe M.1

This is probably an incorrect handling of the timer state, what you're describing is discrepancy between the timer's actual state and its reported state, maybe try using the native FreeRTOS API to stop the timer (xTimerStop())

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.