Dear all,
Good morning,
We are using nrf52832 as our main mcu. Our current consumption in system-off mode in custom board is around 3.2 mA which is very high and we want long battery life.
We have referred many posts and sample codes but did not get success.
My wake up pin configuration and stand by routine is as follow.
#define STAND_BY_BUTTON 5
static void gpio_init(void)
{
ret_code_t err_code;
err_code = nrf_drv_gpiote_init();
APP_ERROR_CHECK(err_code);
nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_TOGGLE(false);
in_config.pull = NRF_GPIO_PIN_PULLUP;
err_code = nrf_drv_gpiote_in_init(STAND_BY_BUTTON, &in_config, in_pin_handler);
APP_ERROR_CHECK(err_code);
nrf_drv_gpiote_in_event_enable(STAND_BY_BUTTON, true);
}
void stand_by(void)
{
ret_code_t err_code;
NRF_SPI0->ENABLE = 0;
NRF_TWI0->ENABLE=0;
NRF_TWI1->ENABLE=0;
NRF_UART0->TASKS_STOPTX = 1;
NRF_UART0->TASKS_STOPRX = 1;
NRF_UART0->ENABLE =0;
sd_power_system_off();
}
One more question is that i am using one single button for wake up pin and for other gpio intterupt. So is it necessary to disable gpiote events before entering to system off mode.
My debug process is also not stopped after entering to system off mode.
So Kindly guide us on this.
Any help will be greatly appreciated..
Thank you.