_timer_cancel()

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

_timer_cancel()

547 次查看
alessandrobiasc
Contributor I

Hi all,

            I'm using MQX 4.2.2 and I have a problem with _timer_cancel() function call.

I'm calling _timer_cancel(id) within the timer's callback itself and it seems that MQX do not find myself and delete me from the scheduled timers in the system. The same function call, called outside the timer's callback works fine.

Question:

    - can _timer_cancel() be called inside the timer's callback itself or we need to call the function outside the timer ?

Best Regards,

           Alessandro.

0 项奖励
回复
1 回复

397 次查看
DavidS
NXP Employee
NXP Employee

Hi Alessandro,

With my testing of the _timer_cancel() it too does not work from within the callback but does work when outside the callback.

Please cancel timer outside of the callback.

Regards,

David

PS

I ran test using C:\Freescale\Freescale_MQX_4_2\mqx\examples\timer for frdm-k64f using CW10.6.

main.c attached.