5 years, 4 months ago.

How to Stop Ticker?

How come there is no function to stop Ticker?

Question relating to:

1 Answer

5 years, 4 months ago.

You stop ticker by attaching it to NULL instead of to some function. You may later re-attach thae same or another function to the same ticker.

Or calling the detach function. I am not actually 100% sure if attaching NULL properly works on a ticker.

posted by Erik Olieman 30 Aug 2014

Thanks Erik for your help.

However using class ticker member function "detach" only stops calling the function that ticker called. But the ticker timer itself is still running.

posted by Elianco S 03 Sep 2014

a late response...., but
please try following sequence to stop the ticker timer.

flipper.detach();
LPC_TIM3->TC = 0;
flipper.attach(&flip, 2.0);
posted by Yoshi Mimura 17 Nov 2014