_timer_cancel()

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

_timer_cancel()

662件の閲覧回数
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 返信

512件の閲覧回数
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.