nRF5340: Build Error During Power Measurement in Low Power Mode (SDK v2.6.1)

Hello,

I’m working on an nRF5340 project and trying to measure power consumption in low power mode using SDK v2.6.1. I followed the instructions provided on your website   but I encountered a build error.

Details:

  • SDK Version: v2.6.1
  • Custom Board : nrf5340-nrf7002

Build Configuration in vs code:  board = nrf7002dk-nrf5340-cpuapp-ns

Reference :

https://docs.nordicsemi.com/bundle/ncs-1.6.0/page/zephyr/reference/power_management/index.html

Steps I followed:
1. Set up the SDK environment as per the documentation.
2. Configured the project for low power mode.
3. Attempted to build the project using the provided instructions.

Troubleshooting steps I’ve tried:
- Rechecked the configuration.
- Cleaned and rebuilt the project.
- Ensured all dependencies were correctly installed.

Despite these steps, the error persists. Could you please assist me in resolving this issue?

Error:


FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.EXE' --build 'c:\ncs\v2.6.1\Waggle_Sensors\application\Node_1\build'

Thank you.

Parents Reply Children
  • I encountered a build issue when attempting to use the pm_state_set() API in our custom project. I have attached the error log for your reference. Interestingly, when I tested the same API in the latency sample file, it worked without any issues.

    i have share the error log link please check

    https://drive.google.com/file/d/1Jl16xjrbsQWVAID1hsWnYgbUF2z6O8Sf/view?usp=sharing

    Could you please help me resolve this issue.


    latency sample code
    
    #include "test.h"
    #include <zephyr/device.h>
    #include <zephyr/kernel.h>
    #include <zephyr/logging/log.h>
    #include <zephyr/pm/policy.h>
    #include <zephyr/sys_clock.h>
    #include <zephyr/pm/pm.h>
    #include <zephyr/drivers/gpio.h>
    #include <zephyr/pm/device.h>
    
    
    LOG_MODULE_REGISTER(app, CONFIG_APP_LOG_LEVEL);
    
    void enter_sleep_mode(void)
    {
    	// Set device to suspend-to-RAM state (deep sleep)
    	pm_state_set(PM_STATE_SOFT_OFF, 0);
    }
    
    void main(void)
    {
    
    	enter_sleep_mode();
    }

    our custom board code

    #include <zephyr/drivers/rtc.h>
    #include <zephyr/drivers/counter.h>
    #include <zephyr/pm/pm.h>
    #include <zephyr/sys/reboot.h>
    #include <zephyr/device.h>
    #include <zephyr/pm/state.h>
    #include <zephyr/pm/device.h>
    #include <zephyr/pm/policy.h>
    
    #include <zephyr/logging/log.h>
    LOG_MODULE_REGISTER(main, CONFIG_APP_LOG_LEVEL);
    
    
    #define RTC_TEST_GET_SET_TIME (1767225595UL)
    
    
    
    /*!
     * @brief The main module consists of the main scheduler designed to coordinate
     * between various modules, initializes all required peripherals, initialize
     * default conditions and call scheduling algorithm.
     *
     *
     * @param[in] None.
     * @return int
     */
    int main(void)
    {
    
    	LOG_INF("Hello World!\n");
    
    	pm_state_set(PM_STATE_SUSPEND_TO_RAM, 0);
    
    	EnterSleepMode();
    }
    

    proj.cof

    CONFIG_I2C=y
    CONFIG_SENSOR=y
    CONFIG_TMP116=y
    CONFIG_NRFX_SPIM2=y
    CONFIG_NRFX_SPIM4=y
    CONFIG_PM=y
     CONFIG_PM_DEVICE=y
    CONFIG_NRFX_SAADC=y
    CONFIG_NRFX_TIMER1=y
    CONFIG_NRFX_DPPI=y
  • Hi Shanmuga, 

    Are you working on the same project with Sasikumar ? If not please create a new ticket. 
    Please check if any of the dependencies is not match. You can check that in the .config file in the build folder.

Related