Hi,
I am using MQX4.0.1, CW10.4.
I created a timer component using
_timer_create_component(TIMER_TASK_PRIORITY, TIMER_STACK_SIZE);
and start the timer using
timerID = _timer_start_oneshot_after((void *)sleep_timer_timeout, 0, TIMER_ELAPSED_TIME_MODE, ui32Timems);
but when I am using _timer_cancle(timerID) , it always return 0x0c.
I check the timerID is 2, and replace _timer_cancle(timerID) by _timer_cancle(2), it returns 0x00.
I can't figure it out why _timer_cancle(timerID) returns 0x0c. Please advice.
Thank you.
解決済! 解決策の投稿を見る。
HI
I implemented the same code according to your setting, but I got the 0x00 every time. I suggest you check the variable "timerID", is it used by other function?
or did you cancel the timer before creating it successfully?
Hi
I have the same problem
any news?
Thank you
Hi,
I checked it.
The reason causing that is because it is used by another task.
Maybe you can check to see if other tasks still using it.
-Daniel
HI
I implemented the same code according to your setting, but I got the 0x00 every time. I suggest you check the variable "timerID", is it used by other function?
or did you cancel the timer before creating it successfully?