MKW30Z TimersManager stop (pause) timer

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

MKW30Z TimersManager stop (pause) timer

1,244 次查看
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,125 次查看
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 项奖励
回复