I am currently working on a low power application using the NRF9160 chip.
During power optimalisation I found out that my sleep current can be reduced from around 50uA to as low as 7uA.
In order to get to these low power values I needed to disable GPIO input interrupts on 4 inputs.
However I need these GPIO interrupts to wake up from deep sleep mode, I came across the following topic:
In this topic it was recommended to use GPIO_INT_LEVEL interrupts instead of GPIO_INT_EDGE, allowing the usage of the GPIOTE peripheral and reduce power consumption.
I tried this setup and indeed reached way better sleep power consumption:
Switch->gpiodev = device_get_binding(Switch->gpiocontroller); gpio_pin_configure(Switch->gpiodev, Switch->pin.index, GPIO_DIR_IN | GPIO_INT | Switch->pin.flags | GPIO_INT_LEVEL | GPIO_INT_ACTIVE_HIGH ); if( Switch->callback_handler ) { gpio_init_callback(&Switch->callback, Switch->callback_handler, BIT(Switch->pin.index)); gpio_add_callback(Switch->gpiodev, &Switch->callback); gpio_pin_enable_callback(Switch->gpiodev, Switch->pin.index); }
However when my input interrupt is triggered by applying a rising edge to this input, the interrupt keeps firing for as long as the input level remains high.
Is there a solution to get the GPIOTE peripheral to be used to reduce power, but to keep the ability to get only a single interrupt on a rising/falling edge?
Kind regards,
Eric