AnsweredAssumed Answered

MQX4.0.1  _timer_cancle() alwasy return MQX_INVALID_PARAMETER?

Question asked by Daniel Chai on Oct 14, 2013
Latest reply on Dec 10, 2013 by Daniel Chai



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.