System-Off Example with Ram retention - power off ram

Hello,
I want to disable parts of my RAM to save power. I implemented this in my project based on the System_Off ram retention example. I'm now not sure if RAM retention is the right approach for me since debugging still has RAM power on.
How do I check these registers or switch off the RAM areas?

nRF connect sdk 2.3.0
nRF 52840

Parents Reply Children
  • Hello Simon,
    Sorry for the imprecise question.
    My application should collect sensor-data in an interval of 2 seconds and consume as little energy as possible in between. The sleep mode must therefore be a System_ON mode in order to access the RTC. An external crystal has already been used to reduce power consumption.
    The RAM size used is currently approx. 33KByte. My current state is that POWER_ON_RETENTION_ON should be applied to blocks 4-8. I currently do this as follows (here as an example for block 8):

    	nrf_power_rampower_mask_off(NRF_POWER, 8, (POWER_RAM_POWER_S0POWER_On << POWER_RAM_POWER_S0POWER_Pos) |
          (POWER_RAM_POWER_S1POWER_On << POWER_RAM_POWER_S1POWER_Pos) |
          (POWER_RAM_POWER_S0RETENTION_Off << POWER_RAM_POWER_S0RETENTION_Pos) |
          (POWER_RAM_POWER_S1RETENTION_Off << POWER_RAM_POWER_S1RETENTION_Pos));

    Am I understanding and applying this correctly, or is there a better way?

    Best regards, 
    Jonas 

Related