This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to configure interrupt on gpio pin to detect button state.

Hi Team,

I am using sdk12.2.2 and nrf52. I want to use one gpio to detect button state & have to operation on that event.

I used one method to configure(code snippet written below)

nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_TOGGLE(true);
in_config.pull = NRF_GPIO_PIN_PULLUP;

err_code = nrf_drv_gpiote_in_init(ARDUINO_1_PIN, &in_config, in_pin_handler);
APP_ERROR_CHECK(err_code);

nrf_drv_gpiote_in_event_enable(ARDUINO_1_PIN, true);

However this method is working as per my requirement but this is consuming 20uA of current that will ruin my battery life requirement.So, can anyone help me for the same.

Parents Reply Children
No Data
Related