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

low power input interrupt

Hi

I am using gpio for input interrupt as below

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

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

nrf_drv_gpiote_in_event_enable(PIN_IN, true);

it is working fine but consume more power. if I do not use that then power consumption reduce to 8ua to 9ua is there any other low power interrupt enable method?

I have read about use the PORT event to trigger a pin interrupt without increasing the current consumption. But don't know how to use that.is there any example that have used PORT event to trigger a pin interrupt?

Thanks

Parents Reply
  • Hi

    If you configure it with TOGGLE polarity you could do something like that. You just have to read the state of the pin using the nrf_drv_gpiote_in_is_set(..) function inside the event handler.
    If the state corresponds to a button press you start the timer, otherwise you stop the timer. If the timer fires it means it wasn't stopped in time, and the long press has occurred.

    Best regards

Children
No Data
Related