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.
Parents
  • I performed some additional experiments and measurements this morning. All current measurements are done on the 1.8V net that feeds VDD of the nRF5340. Here are the results (current in uA):

    Board

    Interrupt/DCDC

    Interrupt/LDO Interrupt/LowPower Power-off Idle CONSTLAT
    A 82 250 3.7 0.96 3.7 2594
    B 196 564 5.9 1.17 5.9 2946

    Explanation of the different scenarios:

    • Interrupt/DCDC - Same application as in my original question, but a new measurement performed this morning.
    • Interrupt/LDO - Same as original question with the addition of CONFIG_BOARD_ENABLE_DCDC_APP=n
    • Interrupt/LowPower - Same as original question with the addition of calling nrfx_gpiote_latency_set(NRF_GPIOTE_LATENCY_LOWPOWER); before configuring the GPIO pin.
    • Power-off: Just calling sys_poweroff(); in main()
    • Idle: Empty main()
    • CONSTLAT: Just calling nrf_power_task_trigger(NRF_POWER, NRF_POWER_TASK_CONSTLAT); in main()

    Across the board we can see that sample B consumes more power than sample A. The absolute and relative differences vary depending on what scenario is tested. I believe this shows quite conclusively that the variability is intrinsic to the MCUs and not something caused by another component on the board, with the possible exception of some supporting component to the MCU e.g. the crystals.

Reply
  • I performed some additional experiments and measurements this morning. All current measurements are done on the 1.8V net that feeds VDD of the nRF5340. Here are the results (current in uA):

    Board

    Interrupt/DCDC

    Interrupt/LDO Interrupt/LowPower Power-off Idle CONSTLAT
    A 82 250 3.7 0.96 3.7 2594
    B 196 564 5.9 1.17 5.9 2946

    Explanation of the different scenarios:

    • Interrupt/DCDC - Same application as in my original question, but a new measurement performed this morning.
    • Interrupt/LDO - Same as original question with the addition of CONFIG_BOARD_ENABLE_DCDC_APP=n
    • Interrupt/LowPower - Same as original question with the addition of calling nrfx_gpiote_latency_set(NRF_GPIOTE_LATENCY_LOWPOWER); before configuring the GPIO pin.
    • Power-off: Just calling sys_poweroff(); in main()
    • Idle: Empty main()
    • CONSTLAT: Just calling nrf_power_task_trigger(NRF_POWER, NRF_POWER_TASK_CONSTLAT); in main()

    Across the board we can see that sample B consumes more power than sample A. The absolute and relative differences vary depending on what scenario is tested. I believe this shows quite conclusively that the variability is intrinsic to the MCUs and not something caused by another component on the board, with the possible exception of some supporting component to the MCU e.g. the crystals.

Children
Related