MKW30Z TimersManager stop (pause) timer

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

MKW30Z TimersManager stop (pause) timer

1,226件の閲覧回数
lucianfiran
Contributor V

KW40Z_Connectivity_Software_1.0.1 (KSDK_1.3.0); IAR 7.50

framework/TimersManager/Interface/TimersManager.h

First case:

TMR_StartSingleShotTimer(id, timeInMilliseconds, pCall, pArg);
a = TMR_GetRemainingTime(id);
TMR_StopTimer(id);
b = TMR_GetRemainingTime(id);

I would expect that the result b is 0 but it's not the case.

(like ~ pause timer)

Trying to stop a timer starting it with 0 (zero) milliseconds:

TMR_StartSingleShotTimer(id, timeInMilliseconds, pCall, pArg);

TMR_StartSingleShotTimer(id, 0, pCall, pArg);

setting to zero act as calling pCall once and stop the timer.

Best Regards,

Lucian

タグ(3)
0 件の賞賛
返信
1 返信

1,107件の閲覧回数
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Lucian

Could you explain what your issue is? if you set a single shot timer like: TMR_StartSingleShotTimer(id, 0, pCall, pArg); it will actually just call your callback pCall and as long as it is just a single shot timer, it will not count anymore, so yes, this is a expected behavior.

Best Regards

Jorge Alcala

0 件の賞賛
返信