Hello everyone,
I want to evaluate the power consumption in idle mode of the nrf9151 sip.
Environement:
- nrf9151dk_rf9151_ns
- nRF Connect SDK Toolchain v3.0.2
- VScode IDE
I've used the solution of exercice 2 of the Cellular IoT Fundamentals series to test the power consumption in its lowest mode.
Here is my prj.conf with some modification:
# # Copyright (c) 2020 Nordic Semiconductor ASA # # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # # Logging CONFIG_LOG=n # Button and LED support CONFIG_DK_LIBRARY=y # Network CONFIG_NETWORKING=y CONFIG_NET_NATIVE=n CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_OFFLOAD=y CONFIG_POSIX_API=y # Memory CONFIG_HEAP_MEM_POOL_SIZE=4096 CONFIG_MAIN_STACK_SIZE=4096 # Modem library # STEP 2 - Enable the nRF Modem library CONFIG_NRF_MODEM_LIB=y # LTE link control # STEP 3 - Enable the LTE link controller library CONFIG_LTE_LINK_CONTROL=y CONFIG_PM=y CONFIG_PM_DEVICE=y CONFIG_PM_DEVICE_RUNTIME=y CONFIG_TICKLESS_KERNEL=y CONFIG_NRFX_POWER=y # AT commands interface # STEP 12 - Enable the AT Host library #CONFIG_AT_HOST_LIBRARY=y #CONFIG_UART_INTERRUPT_DRIVEN=y
Here is my main.c with some modifications:
/* * Copyright (c) 2020 Nordic Semiconductor ASA * * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ #include <stdio.h> #include <ncs_version.h> #include <zephyr/kernel.h> #include <zephyr/logging/log.h> #include <dk_buttons_and_leds.h> #include <zephyr/pm/pm.h> #include <zephyr/pm/state.h> #include <hal/nrf_power.h> #include <hal/nrf_regulators.h> /* STEP 4 - Include the header file of the nRF Modem library and the LTE link controller library */ #include <modem/nrf_modem_lib.h> #include <modem/lte_lc.h> /* STEP 5 - Define the semaphore lte_connected */ static K_SEM_DEFINE(lte_connected, 0, 1); LOG_MODULE_REGISTER(Lesson2_Exercise2, LOG_LEVEL_NONE); /* STEP 7 - Define the event handler for LTE link control */ static void lte_handler(const struct lte_lc_evt *const evt) { switch (evt->type) { /* STEP 7.1 - On changed registration status, print status */ case LTE_LC_EVT_NW_REG_STATUS: if ((evt->nw_reg_status != LTE_LC_NW_REG_REGISTERED_HOME) && (evt->nw_reg_status != LTE_LC_NW_REG_REGISTERED_ROAMING)) { break; } LOG_INF("Network registration status: %s", evt->nw_reg_status == LTE_LC_NW_REG_REGISTERED_HOME ? "Connected - home network" : "Connected - roaming"); k_sem_give(<e_connected); /* STEP 10 - Turn on the LED status LED */ dk_set_led_on(DK_LED2); break; /* STEP 7.2 - On event RRC update, print RRC mode */ case LTE_LC_EVT_RRC_UPDATE: LOG_INF("RRC mode: %s", evt->rrc_mode == LTE_LC_RRC_MODE_CONNECTED ? "Connected" : "Idle"); break; default: break; } } /* STEP 6 - Define the function modem_configure() to initialize an LTE connection */ static int modem_configure(void) { int err; LOG_INF("Initializing modem library"); err = nrf_modem_lib_init(); if (err) { LOG_ERR("Failed to initialize the modem library, error: %d", err); return err; } LOG_INF("Connecting to LTE network"); err = lte_lc_connect_async(lte_handler); if (err) { LOG_ERR("Error in lte_lc_connect_async, error: %d", err); return err; } return 0; } int main(void) { int err; if (dk_leds_init() != 0) { LOG_ERR("Failed to initialize the LEDs Library"); } /* STEP 8 - Call modem_configure() to initiate the LTE connection */ err = modem_configure(); if (err) { LOG_ERR("Failed to configure the modem"); return 0; } /* STEP 9 - Take the semaphore lte_connected */ k_sem_take(<e_connected, K_FOREVER); LOG_INF("Connected to LTE network"); // Small delay to show LED before powering off k_sleep(K_SECONDS(2)); dk_set_led_off(DK_LED2); LOG_INF("Powering off LTE modem"); err = lte_lc_power_off(); if (err) { LOG_ERR("Failed to power off the modem: %d", err); } LOG_INF("Shutting down modem library"); err = nrf_modem_lib_shutdown(); if (err) { LOG_ERR("Failed to shutdown modem library: %d", err); } // Configure regulators for lowest power nrf_regulators_system_off(NRF_REGULATORS_NS); while(1){ k_sleep(K_FOREVER); } return 0; }
After flashing the board, using an Otii arc, I've powered it with 4.5V connected to the VDD nRF and the GND.
I've got 64µA in idle mode.
In the nRF9160 product specification c.f §5.6.1 p64, the power consumption in my case should be 18µA (Imcuon3).
Am I missing something regarding the EVB or the config?
Thank you in advance for your response!