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

High current with GPIOTE

Hi there,

I added the GPIOTE driver for the project ble_app_blinky_c under the SDK13, where if I enable GPIOTE my current consumption in sleep mode jumps from 3uA to 5mA

The only thing I did to my program was adding the GPIOTE driver and enable it:

//top of my main
#include "nrf_gpio.h"
#include "nrf_drv_gpiote.h"
//top of my main.c


//inside int main()

nrf_drv_gpiote_out_config_t out_config = 
{
	NRF_GPIOTE_POLARITY_TOGGLE,
	NRF_GPIOTE_INITIAL_VALUE_LOW,
	false
};

APP_ERROR_CHECK(  nrf_drv_gpiote_init() );

APP_ERROR_CHECK(  nrf_drv_gpiote_out_init(28, &out_config)  ); 
nrf_drv_gpiote_out_set(28);

has something wrong the initialization for a gpiote pin as output?

Also, I noticed the same behavior on the peripheral/gpiote example (unmodified) where the current is above 6mA

Any suggestion?

Regards,

Arepa

#update#

I tried using nrf_gpio.g instead of gpiote driver

It reduced the current consumption considerably, but it seems still high to me around 1.5mA

Note: I am using a custom board where the pin I am enabling is a floating pin /

Parents
  • Hi,

    Did the current increase from 3 uA to 5 mA just by adding GPIOTE to the application? 5 mA indicates to me that the CPU is not entering sleep mode at all. Can you share your project?

    The GPIOTE example in peripherals directory do not call __WFE(), and will thus never enter sleep mode. It is therefore not a surprise that this has a high current consumption. The example is showing how to use the GPIOTE to toggle pins without CPU intervention, it is not intended as a low-power example.

    Best regards,
    Jørgen

Reply
  • Hi,

    Did the current increase from 3 uA to 5 mA just by adding GPIOTE to the application? 5 mA indicates to me that the CPU is not entering sleep mode at all. Can you share your project?

    The GPIOTE example in peripherals directory do not call __WFE(), and will thus never enter sleep mode. It is therefore not a surprise that this has a high current consumption. The example is showing how to use the GPIOTE to toggle pins without CPU intervention, it is not intended as a low-power example.

    Best regards,
    Jørgen

Children
Related