Current consumption testing of basic GPIO usage on nRF9151DK

Hello,

This morning I thought I would investigate the current consumption of some of the examples in the nRF connect SDK Fundamentals using the nRF9151DK and the PPK II. In all current measurement experiments, I followed this hardware setup adapted for the nRF9151DK hardware.

  • The PPK II was powered via its USB data/power connector from my computer
  • VOUT on the PPK was connected to VDD_nRF on P22 of the DK
  • GND from the PPK was connected to GND on P22 of the DK
  • A connection was made between my computer and the DK via the USB-C connector and the power slider remained in the ON position (unless otherwise specified)
  • Current measured in Source Mode with an output voltage of 3.7V

Test 1: From the nRF Connect SDK Fundamentals, I flashed the sample code from L02E02 and began measuring current. I received an average measurement of over 3.5mA! Surely I must be doing something wrong.

Test 2: I followed these guidelines setting CONFIG_SERIAL=n and CONFIG_TFM_LOG_LEVEL_SILENCE=y in my prj.conf file. I again measured current and received around 3mA. A little better but still orders of magnitude more than expected.

Test 3: Now I tried adding this line right before sleeping: lte_lc_power_off(); and received 2.8mA.

Test 4: Now I replaced my entire main function with this test code which surely should drop the current down considerably...and yet still 2.8mA.

 lte_lc_power_off();
k_sleep(K_MSEC(1000));
NRF_REGULATORS->SYSTEMOFF = 1;

Test 5: Now with the same code as test 4, I slide the power slider on the DK from the ON to OFF position. As far as I know, this should kill all power to the debugger and everything else on the DK. I took another current measurement and still received 2.8mA.

Any advice? I'm thoroughly puzzled at this point. Thank you!

  • I did another slight variation today, with the following code:

    #include <modem/lte_lc.h>
    #include <zephyr/sys/poweroff.h>

    int main(void) {
    lte_lc_power_off();
    k_sleep(K_MSEC(1000));
    sys_poweroff();
    return 0;
    }
    My prj.conf was the following:
    CONFIG_POWEROFF=y

    CONFIG_LTE_LINK_CONTROL=y
    - With the PPKII in Source Mode set to 3.7V.
    - PPKII VOut connected to VDD_nRF on nRF9151DK P22
    - PPKII GND connected to GND on nRF9151DK P22
     
    Current measurement is still 2.8mA which is the active CPU current. It appears this is the lowest the DK will ever go?
     
  • Hi,

    Can you share your sample code for all test cases including build commands, so that I could try to replicate your results?

    Best regards,
    Dejan

  • Hi Dejan,

    Thanks for reaching out. Sure thing. I will share the most simple test case in an effort to make replication easier for you.

    Setup:

    • nRF Connect: nRF Connect SDK and Toolchain v2.9.0
    • Hardware markings: nRF9151DK, PCA10171, 0.9.0, 2024.37

    prj.conf

    CONFIG_SERIAL=n
    CONFIG_TFM_LOG_LEVEL_SILENCE=y
    
    CONFIG_LTE_LINK_CONTROL=y
    main.c (this was pulled directly from here)
    #include <modem/lte_lc.h>
    void main(void)
    {
    	lte_lc_power_off();
    	k_sleep(K_MSEC(1000));
    	NRF_REGULATORS->SYSTEMOFF = 1;
    }
    Build commands:
    • I generated a pristine build from nRF Connect selecting the correct board (nRF9151dk/nrf9151/ns)
    • This successfully built a file with one warning below, but this should be ignorable.
      • "warning: return type of 'main' is not 'int'
    • I flashed the merged.hex file to the board

    Measurement steps:

    • USB C plugged into nRF9151DK with the power switch on the DK turned on.
    • Jumper removed from P22
    • VOUT from PPKII connected to VDD_nRF on P22
    • GND from PPKII connected to GND on P22
    • PPKII set in Source Meter mode with a supply voltage of 3715mV.
    • Started sampling for 60 seconds
    • Enabled power output on the PPKII
    • Average current is 2.8mA

    Additional information: I actually tried running all of the above code and measurement steps on a different nRF9151DK my rep sent me as a sanity check. Received the same 2.8mA unfortunately.

    As far as I can tell, this code should be putting the DK to the deepest sleep possible, though unfortunately it remains awake.

  • Hi,

    Thank you for providing detailed steps. 
    Following your steps I got the result for current consumption of 2.77 mA. If you want to see lower power consumption, you could try to make some changes to your main.c and configuration file prj.conf, Please find the changes below.
    main.c

    nrf_modem_lib_init();
    lte_lc_power_off();
    k_sleep(K_MSEC(1000));
    NRF_REGULATORS->SYSTEMOFF = 1;
    nrf_modem_lib_shutdown();
    sys_poweroff();
    return 0;

    prj.conf
    CONFIG_SERIAL=n
    CONFIG_LOG=n
    CONFIG_GPIO=y
    CONFIG_NRF_MODEM_LIB=y
    CONFIG_LTE_LINK_CONTROL=y
    CONFIG_POWEROFF=y

    With these changes I managed to get around 1.97 uA.

    Best regards,
    Dejan

  • Hi Dejan,

    Amazing! Thank you very much for your support. I flashed your changes and received below 2 uA as measured by the PPKII.

    It's quite interesting that the nRF9151 requires both NRF_REGULATORS->SYSTEMOFF = 1; as well as a sys_poweroff(); function call. I will investigate this in more detail over the weekend.

    Thanks again!

Related