Does the RAM power-down library support nRF9160?

Hello everyone.

I am developing a custom board using the nRF9160. I tried using the RAM power-down library based on the Power optimization recommendations page of the nRF Connect SDK.

CONFIG_RAM_POWER_DOWN_LIBRARY=y 

However, when building I got the following message:

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.

It seems that the RAM power down library does not support nRF9160, so please tell me how to use the RAM power down library with the nRF9160. 
Thanks in advance.
Parents
  • Hello matsuura,

    I have started an internal inquiry about this. I will let you know as soon as I get any feedback from our team.

    Hieu

  • Hello matsuura,

    You can turn off RAM directly via the VMC by writing to RAM[n].POWERSET.

    Looking into the RAM Power Down library, you will be able to see that it simply unifies the API to do so across different nRF products.

    However, if you turn off RAM dynamically, you might find it hard to maintain correct state data, since nRF9160 applications usually use a lot of RAM. You can also consider just disabling some RAM banks statically in the DeviceTree instead.

    Hieu

  • Hello hieu,


    What I want to do here is disabling RAM banks statically, so I would like to do it with the Devicetree. If you know of any useful pages, please let me know.
    Thanks for your advice.

  • Hello matsuura,

    I might have been wrong about only have to change RAM available in the DeviceTree. Doing that only ensures the application not allocating anything onto the RAM space that will be disabled; and you still need to disable RAM using VMC.

    Please give it a try. I will also experiment and follow up with any findings.

  • Hello hieu,

    If I wanted to disable 64Kbytes of RAM on the nRF9160, would the following be correct?

    1) Define the area that the application will not access in pm_static.yml

    sram_inactive:
      address: 0x20030000
      region: sram_primary
      inside:
      - sram_nonsecure
      size: 0x010000


    2) Turn off the power to that area by manipulating the RAM[n].POWERCLR register as follows:
    nrf_vmc_ram_block_power_clear(NRF_VMC_NS, 6, 0x0f);
    nrf_vmc_ram_block_power_clear(NRF_VMC_NS, 7, 0x0f);

    Thanks for your advice.

  • Hello matsuura,

    I didn't think about disabling RAM with the Partition Manager, but that certainly works.

    You can also disable it via the DeviceTree. This will work both when RAM partitioning is done with and without Partition Manager. I tested this and it reduces RAM size to 128kB.

    &sram0 {
    	reg = <0x20000000 DT_SIZE_K(128)>;
    };
    

    I don't have a nRF9160 DK to test with at the moment, but I tested both the Partition Manager and the DeviceTree method on a nRF52840 DK, and it works. The key point being power consumption is lowered, and the application is linked with less RAM.

    Your usage of the API shows you already know about the separation of RAM into secure and non-secure domain. Please pay attention to that too.

    Finally, I assume this is done to save power consumption. Please try to measure the current consumption before and after to confirm the change is effective.

  • Hello hieu,
    Thanks for the advice. I'll try measuring the power consumption this way !!

Reply Children
No Data
Related