Use the power_down_unused_ram() function

Hello, 

In my code, I would like to use the power_down_unused_ram() function. I included the ram_pwrdn.h file but the build returns with undefined reference to `power_down_unused_ram'. 

I used https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/others/ram_pwrdn.html as reference.

Is there anything else I should add? I'm using the nrf9161 dk board.

Parents Reply Children
  • I added this configuration but the error continues. This warning also appears:

    warning: RAM_POWER_DOWN_LIBRARY (defined at C:/ncs/v2.6.1/nrf\lib\ram_pwrdn/Kconfig:7) was assigned
    the value 'y' but got the value 'n'. Check these unsatisfied dependencies: (SOC_NRF52840 ||
    SOC_NRF52833 || SOC_NRF5340_CPUAPP) (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_RAM_POWER_DOWN_LIBRARY and/or look up
    RAM_POWER_DOWN_LIBRARY in the menuconfig/guiconfig interface. The Application Development Primer,
    Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
    helpful too.

    This config don't work with nRF9161 SiP ?

  • uff, yes you are right. I missed to see the dependencies for this.

    It looks like this library is not available in the long range nRF9X products. Not sure why.

    apart from the dependencies, it is also in the source code in ncs\v2.6.1\nrf\lib\ram_pwrdn\ram_pwrdn.c, it says 

    #if defined(CONFIG_SOC_NRF52840) || defined(CONFIG_SOC_NRF52833)
    #include <hal/nrf_power.h>
    #elif defined(CONFIG_SOC_NRF5340_CPUAPP)
    #include <hal/nrf_vmc.h>
    #else
    #error "RAM power-down library is not supported on the current platform"
    #endif

Related