Hi. I'm using PCA10028, SDK10.0.0, S130.
I made timer(repeated) as below.
void init_timer(void) { uint32_t err_code; err_code = app_timer_create(&m_timer_id, APP_TIMER_MODE_REPEATED, one_msecond_timer_callback); APP_ERROR_CHECK(err_code);
err_code = app_timer_start(m_timer_id, APP_TIMER_TICKS(RTC_EVENT_INTERVAL_MS, RTC_PRESCALER), NULL);
APP_ERROR_CHECK(err_code);
}
It works well.
I called timer stop as below.
init_timer();
app_timer_stop_all();
for (;;)
{
power_manage();
}
OK. Timer's event handler wasn't called. It looks well.
But in "power_manage" function. If I add gpio toggle function, it works. It's wierd.
static void power_manage(void) {
uint32_t err_code = sd_app_evt_wait();
nrf_gpio_pin_toggle(12);
APP_ERROR_CHECK(err_code);
}
I think, if i stop timer, "sd_app_evt_wait" function can't get any event. So this code never reach to "nrf_gpio_pin_toggle(12);" if there is no event.
As I see the result, event's still alive although I stop all timer.
Can you explain about this? I need your help.