Hi,
I am using nrf52832, and measure the power consumption , I found that when I use application timer "after" nrf_sdh_disable_request(), the power consumption of system down will more than use application timer "before" nrf_sdh_disable_request().
1. I put the timer before nrf_sdh_disable_request(), the system down total current consumption is 0.25mA.
ret_code_t err_code = nrf_sdh_enable_request(); APP_ERROR_CHECK(err_code); ret_code_t ret = app_timer_create(&timer_2, APP_TIMER_MODE_REPEATED, timer_handle2); APP_ERROR_CHECK(ret); ret = app_timer_start(timer_2, APP_TIMER_TICKS(100), NULL); APP_ERROR_CHECK(ret); err_code = nrf_sdh_disable_request(); APP_ERROR_CHECK(err_code); do { __SEV(); __WFE(); __WFE(); } while (!(jack_int_detect || button_int_detect || waiting_int_detect));
2. I put the timer after nrf_sdh_disable_request(), the system down total current consumption is 0.89mA.
ret_code_t err_code = nrf_sdh_enable_request();
APP_ERROR_CHECK(err_code);
err_code = nrf_sdh_disable_request();
APP_ERROR_CHECK(err_code);
ret_code_t ret = app_timer_create(&timer_2, APP_TIMER_MODE_REPEATED, timer_handle2);
APP_ERROR_CHECK(ret);
ret = app_timer_start(timer_2, APP_TIMER_TICKS(100), NULL);
APP_ERROR_CHECK(ret);
do {
__SEV();
__WFE();
__WFE();
} while (!(jack_int_detect || button_int_detect || waiting_int_detect));
Anyone know why the current consumption is different?