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

Increased power consumption when using GPIOTE on nrf52840

We see an increased power consumption at around 26uA when enabling GPIOTE IN events in our application with a NRF52840_xxAA_REV1 chip.

We use nRF5_SDK_15.2.0_9412b96 and the following code:

    // reg is NRF_P1, pin is 13
    reg->PIN_CNF[pin] &= ~(GPIO_PIN_CNF_DIR_Msk | GPIO_PIN_CNF_INPUT_Msk);
    reg->PIN_CNF[pin] |=
        (GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos)
        | (GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos);

    reg->PIN_CNF[pin] &= ~GPIO_PIN_CNF_PULL_Msk;
    reg->PIN_CNF[pin] |= GPIO_PIN_CNF_PULL_Pulldown << GPIO_PIN_CNF_PULL_Pos;

    // slot is 0, portpin is 0x0100 + 13
    nrf_gpiote_te_default(slot);

    nrf_gpiote_event_configure(slot, portpin, NRF_GPIOTE_POLARITY_LOTOHI);

    NRF_GPIOTE->EVENTS_IN[slot] = 0;
    nrf_gpiote_event_enable(slot);
    nrf_gpiote_int_enable(1 << slot);


With this code our application use around 32uA. After removing the call to nrf_gpiote_event_enable, it uses around 5uA. Looking at the graph, I see that it is the baseline that is increased.

During the measurement we don't trigger the pin and the interrupt isn't called.

I've also tried the same thing on port P0.11 with the same result.

Is this an expected power increase?

Related