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

About current consumption of GPIO and GPIOTE

I have a question about the current consumption of GPIO and GPIOTE.

I want to use port in input configuration.
Therefore, the following settings are made ("P_WUP_BLE" is a port number).

nrf_gpio_pin_dir_set(P_WUP_BLE, NRF_GPIO_PIN_DIR_INPUT );

Also, I want to go to sleep to reduce current consumption.
Therefore, the following settings are made.

ret_code_t	err_code;

err_code = sd_app_evt_wait();
APP_ERROR_CHECK(err_code);

When the current consumption is measured at this setting, it is close to the theoretical value.


I want this port to have an external interrupt function.
Therefore, the following settings are made.

ret_code_t err_code;
nrf_drv_gpiote_in_config_t in_config;

in_config = GPIOTE_CONFIG_IN_SENSE_TOGGLE (true);
err_code = nrf_drv_gpiote_in_init (P_WUP_BLE, & in_config, e_pin_handler);
APP_ERROR_CHECK (err_code);

nrf_drv_gpiote_in_event_enable (P_WUP_BLE, true);

If this setting is added, current consumption increases.
Please tell me the reason.

Parents
  • Hi

    The high accuracy mode will need to use the external HFCLK, which is listed to use at least 250uA when it is on, which means that running in high accuracy mode likely will consume somewhat more current than this.

    If you set GPIOTE_CONFIG_IN_SENSE_TOGGLE(false) like  suggested, your application will use normal mode, and only use the LFCLK, which consumes way less power, and your total current consumption will decrease significantly.

    Best regards,

    Simon

Reply
  • Hi

    The high accuracy mode will need to use the external HFCLK, which is listed to use at least 250uA when it is on, which means that running in high accuracy mode likely will consume somewhat more current than this.

    If you set GPIOTE_CONFIG_IN_SENSE_TOGGLE(false) like  suggested, your application will use normal mode, and only use the LFCLK, which consumes way less power, and your total current consumption will decrease significantly.

    Best regards,

    Simon

Children
Related