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

    For the nRF52832 the external HF clock is listed at a minimum of 250uA when running (this is the clock that's recommended for high acc. mode). When in high acc. mode you will likely use more current, as 250uA is the minimum drawn by the HFCLK when it's running.

    By doing as says, and setting GPIOTE_CONFIG_IN_SENSE_TOGGLE(false), you should be able to run this in normal mode, which uses an LF clock instead, consuming way less power (I don't have the exact numbers). Keep in mind that this also will be less accurate.

    Best regards,

    Simon

Reply
  • Hi

    For the nRF52832 the external HF clock is listed at a minimum of 250uA when running (this is the clock that's recommended for high acc. mode). When in high acc. mode you will likely use more current, as 250uA is the minimum drawn by the HFCLK when it's running.

    By doing as says, and setting GPIOTE_CONFIG_IN_SENSE_TOGGLE(false), you should be able to run this in normal mode, which uses an LF clock instead, consuming way less power (I don't have the exact numbers). Keep in mind that this also will be less accurate.

    Best regards,

    Simon

Children
No Data
Related