This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Power down/on a RAM section

Hi,

I'm trying to find a way to power down and on again a RAM section, but I haven't had any luck finding.

In the SDK examples, there's a RAM retention example only, but I'm interested in power down a RAM section.

If there's any documents or examples, it would be great.

Best Regards,

Parents Reply
  • Hi Vidar,

    Thanks for the answer. I have two more questions regarding the second link.

    Based on my understanding, the following code changes values of registers for section 0 and 1 in RAM0, and the system is going to turn off the power of RAM (typically within 10 cycles?).

    NRF_POWER->RAM[0].POWERCLR = 0x3; // 00000011 in binary

    At this point, after changing the values, how can I check whether the sections are powered down or not? Can I simply assume that the power is down after 10 cycles?

    Another question is how can I turn it on again? By putting zeros to POWERCLR or putting ones to POWERSET?

    NRF_POWER->RAM[0].POWERCLR = 0; // 00000000 in binary

    or

    NRF_POWER->RAM[0].POWERSET = 0x3; // 00000011 in binary

    Best Regards,

    Seung

Children
  • Hello Seung,

    Yes, writing 0x3 to RAM[0].POWERCLR will turn off section 0 and 1 in RAM0. I'm not sure how many cycles it takes, but you can read back the RAM[0].POWER register to check the current setting. This should work as a synchronization barrier as well. Note that the RAM block will be powered when the chip is in debug interface mode.

    You can write 0x3 to RAM[0].POWERSET to enable the RAM sections again as you said. NRF_POWER->RAM[0].POWERCLR = 0 will not have any effect.

    Best regards,

    Vidar

  • Hi Vidar,

    I didn't know that RAM blocks are powered when the chip is in debug mode. That explains why I was unavailable to power down RAM sections. I will test on release mode.

    Hope it can resolve my issue.

    Thanks for your help.

    Best Regards,

    Seung

Related