This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

App_timer stops working

I have a timer that is coming every 100ms. I use it as a system clock to time and manage events. The main function has a loop that calls sd_app_evt_wait() When woken up by the interrupt it reads an accelerometer through i2c.

It works for a while and then it stops working. What would cause the timer to stop working? I even changed the code to stop the timer, do the accelerometer read and then start the timer again and it still gets to a point where the timer stops firing.

//setting up timer APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);

err_code = app_timer_create(&m_timer_systemTick_id,APP_TIMER_MODE_REPEATED,systemTick);

//command to start timer app_timer_start(m_timer_systemTick_id,APP_TIMER_TICKS(100,APP_TIMER_PRESCALER),NULL);

Related