Hi,everyone!
I need to configure an external interrupt so that when the interrupt is triggered, I can do something else
void tap_int_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action) { read_tap_state(); }
When I configure it in the following code, it does not break, but its current is normal, only 3uA
nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(false);
in_config.pull = NRF_GPIO_PIN_PULLDOWN;
err_code = nrf_drv_gpiote_in_init(TAP_INT, &in_config, tap_int_handler);
APP_ERROR_CHECK(err_code);
nrf_drv_gpiote_in_event_enable(TAP_INT, true);
When I configure it with the following code, it will break, but the current is 10uA,
nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(true);
in_config.pull = NRF_GPIO_PIN_PULLDOWN;
err_code = nrf_drv_gpiote_in_init(TAP_INT, &in_config, tap_int_handler);
APP_ERROR_CHECK(err_code);
nrf_drv_gpiote_in_event_enable(TAP_INT, true);
How can I make it both interruptible and as little current as possible
thanks!