MKW30Z TimersManager stop (pause) timer

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MKW30Z TimersManager stop (pause) timer

579 Views
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

Tags (3)
0 Kudos
1 Reply

460 Views
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 Kudos