Large variability in power consumption of nRF5340 GPIOTE in event mode

I have been working on finding the cause to an unexpectedly high power power consumption in several newly produced units of our product based on nRF5340. I believe I have narrowed it down to edge triggered GPIOs in EVENT mode.

Here is a minimal application I used to recreate the issue in isolation:

#include <zephyr/drivers/gpio.h>
#include <zephyr/devicetree.h>

int main(void)
{
    struct gpio_dt_spec irq = GPIO_DT_SPEC_GET(DT_NODELABEL(accel), irq_gpios);

    gpio_pin_configure(irq.port, irq.pin, GPIO_INPUT | GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN);
    gpio_pin_interrupt_configure_dt(&irq, GPIO_INT_EDGE_TO_ACTIVE);

    return 0;
}


Building the above program and flashing it to two different boards gives very different current consumption: 85 uA in one case and 204 uA in another (measured at 1.8V net powering VDD). Note that nothing is triggering the pin. I'm just configuring it to be able to trigger.

What I want to know is if this current consumption and its variability is expected for nRF5340 when using GPIOTE IN events. This is the first time we observe a difference of this magnitude. If it is not expected I am looking for suggestions on further experiments I can run that might help explain the discrepancy.

Some more context:

  • The boards in question behave similarly for all other experiments I have run.
  • Every function on the board that can be, has been profiled in isolation and disabled for the above experiment.
  • CONFIG_I2C=y is set in order to power down one external chip whose power cannot be switched off directly
  • Using sense-edge-mask to make the pin in question use SENSE mode makes both boards drop to similar current levels <10 uA.
  • The result is the same when a different pin is used in the experiment.
Related