Hi Devs,
I have 2 issues in my application when adding twi and gpiote
the first, when adding gpiote to drive an output it increases my current about 280uA, does not matter if its clear or set the pin, I am using the following configuration:
APP_ERROR_CHECK(nrf_drv_gpiote_init()); nrf_drv_gpiote_out_config_t out_config; out_config.init_state = NRF_GPIOTE_INITIAL_VALUE_LOW; out_config.task_pin = false; APP_ERROR_CHECK(nrf_drv_gpiote_out_init(GPIO4, &out_config)); nrf_drv_gpiote_out_set(GPIO4);
when using TWI, I want to disable it after being used to save power and the current consumption keep steady about 1mA, after using the code below:
NRF_TWI1->TASKS_STOP = 1; NRF_TWI1->ENABLE = TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos; NRF_TWI1->INTENCLR = (TWI_INTENCLR_STOPPED_Disabled << TWI_INTENCLR_STOPPED_Pos)| \ (TWI_INTENCLR_RXDREADY_Disabled << TWI_INTENCLR_RXDREADY_Pos)| \ (TWI_INTENCLR_TXDSENT_Disabled << TWI_INTENCLR_TXDSENT_Pos)| \ (TWI_INTENCLR_ERROR_Disabled << TWI_INTENCLR_ERROR_Pos)| \ (TWI_INTENCLR_BB_Disabled << TWI_INTENCLR_BB_Pos);
what are the best practices to disable and enable both drives to save power?
my power consumption in sleep mode jumps from 5uA to 1.3mA!! from just enabling both peripherals
details:
nRF52832 and SDK13
Regards,
Arepa