I have a custom beacon application that is mostly idle. Before adding a timer, the current consumption was 3.2uA. After adding the timer, the current consumption jumped to over 400uA. The timer is used to start the advertising once or twice a day. What am I missing to get the current down to something reasonable? Here's my timer setup:
nrf_drv_timer_config_t timer_cfg = NRF_DRV_TIMER_DEFAULT_CONFIG;
timer_cfg.bit_width = NRF_TIMER_BIT_WIDTH_32;
timer_cfg.frequency = NRF_TIMER_FREQ_31250Hz;
err_code = nrf_drv_timer_init(&m_timer, &timer_cfg, timer_handler);
APP_ERROR_CHECK(err_code);
uint32_t cycle_time_sec = *(uint32_t *)ADVERTISING_CYCLE_ADDRESS;
ticks = nrf_drv_timer_ms_to_ticks(&m_timer, BATTERY_TIMER * cycle_time_sec);
/* setup m_timer for compare event */
nrfx_timer_extended_compare(&m_timer,
NRF_TIMER_CC_CHANNEL0,
ticks,
NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK,
true);
nrf_drv_timer_enable(&m_timer);