Unable to disable GPIOTE for nRF Connect SDK 2.6.1

Hi, 

Recently I upgraded to nRF Connect SDK 2.6.1 and I was required to enable the GPIOTE in order to build properly. Doing this has significantly increased (nearly doubled) the total current consumption at runtime. How can I disable this peripheral now? I am unable to do so now using the overlay file.

Old: 

&gpiote {
    status = "disabled";
};
New:
&gpiote {
    status = "okay";
};

Thank you,

Parents Reply Children
  • My above approach works to compile the code, but now the interrupt pin does not get configured when running the following function.

    gpio_pin_interrupt_configure_dt(&int_pin, (GPIO_INT_EDGE_TO_ACTIVE));

    It fails because internally it is looking for GPIOTE to be enabled. This worked without an issue on v2.4.2. 

  • I do not get it. You would like to disable gpiote peripheral but still want to configure interrupt pin on GPIO. GPIO peripheral do not have interrupts, look at the registers for GPIO peripheral. All the GPIO interrupts are handled by GPIOTE peripheral. 

    If you want interrupts on GPIO, you need to enable the GPIOTE. If you want to use GPIOTE and have lower power consumption, you need to make sure that you are using PORT events with lower accuracy sampling not using the HFCLK. 

    Susheel Nuguru said:
    You need to use PORT events instead of high precision events when using GPIOTE with lower power consumption. Can you try if the suggestion mentioned here works with nRF53 aswell?

    If you still want interrupts on GPIO, then please try this as power consumption was your initial issue that made you think that you can disable GPIOTE.

  • I think the confusion was around me using the nRF Connect SDK 2.4.2. It allowed me to disable the GPIOTE peripheral in the overlay file, but still have access to GPIO interrupts. I thought the GPIOTE was used for the PPI interfaces only. 

    I will try your suggestion and get back to you. Thank you.

  • I added the following to my .overlay file. I see it represented in the zephyr.dts, but I am still drawing a lot more current (396uA vs. 199uA).

    &gpio0 {
    	compatible = "nordic,nrf-gpio";
    	sense-edge-mask = <0xffffffff>;
    };
    
    &gpio1 {
    	compatible = "nordic,nrf-gpio";
    	sense-edge-mask = <0xffffffff>;
    };

    I also added this to try and set the latency to be low-power.

        // Low-power mode for GPIOTE
        NRF_GPIOTE->LATENCY = 0;

    All other firmware is the same as it was in v2.4.2. Am I missing something else?

  • I am still stuck on this issue. My GPIOs with interrupts are configured like this.

    gpio_pin_configure_dt(&primary_pwr, GPIO_INPUT);
    gpio_pin_interrupt_configure_dt(&primary_pwr, GPIO_INT_EDGE_TO_ACTIVE);

    Am I missing a new config for v2.6.1?

    Thank you,

Related