nRF52840 RAM Retention in System ON Mode

Hello,

I am performing current measurements on custom hardware with the nRF52840 and comparing my results with the values in the nRF52840 product specification. I noticed that the product specification for the nRF52840 Sleep Current mentions current consumption values for System ON mode with RAM retention and with no RAM retention.

What does no RAM retention in System ON mode mean? The documentation for nRF52840 RAM POWER registers says that "RAM sections are always retained when on" so I don't understand how one could have no RAM retention when in System ON mode. Does no RAM retention in System ON mode mean that the RAM sections are powered off?

Thank you,

Mark

  • Hello Mark,

    Unused RAM sections can be power down in system ON mode (RAM power control). So no RAM retention in System ON means that all blocks are powered off with retention disabled. Here is an example of you can power down all RAM blocks (replace with softdevice API if softdevice is enabled):

    NRF_POWER->RAM[0].POWERCLR = 0x3; //See memory section in PS for number of RAM sections in each block.
    NRF_POWER->RAM[1].POWERCLR = 0x3;
    NRF_POWER->RAM[2].POWERCLR = 0x3;
    NRF_POWER->RAM[3].POWERCLR = 0x3;
    NRF_POWER->RAM[4].POWERCLR = 0x3;
    NRF_POWER->RAM[5].POWERCLR = 0x3;
    NRF_POWER->RAM[6].POWERCLR = 0x3;
    NRF_POWER->RAM[7].POWERCLR = 0x3;
    NRF_POWER->RAM[8].POWERCLR = 0x3F;

    for(;;)
    {
    __WFE();
    }

    Best regards,

    Vidar