Hi,
I need to store few variables values(long a = 4568;) to RAM (might be some other place) when the system went to sytem off mode .
How I can achieve in the nRF 51822 version 3.1 controller with SDK 6 and SD S110 .
Regards, Anand
Hi,
I need to store few variables values(long a = 4568;) to RAM (might be some other place) when the system went to sytem off mode .
How I can achieve in the nRF 51822 version 3.1 controller with SDK 6 and SD S110 .
Regards, Anand
Hi Anand,
I am assuming that you are asking on how to put RAM in retention mode just before system off.
// Switch on both RAM banks when in System OFF mode.
NRF_POWER->RAMON |= (POWER_RAMON_OFFRAM0_RAM0On << POWER_RAMON_OFFRAM0_Pos) |
(POWER_RAMON_OFFRAM1_RAM1On << POWER_RAMON_OFFRAM1_Pos);
// Enter System OFF and wait for wake up from GPIO detect signal.
NRF_POWER->SYSTEMOFF = 0x1;
This will put both the RAM banks into retention and your stored values in ram will retain their values after the system wakes up from OFF mode.
I would also recommend you to use latest SDK available for your projects. developer.nordicsemi.com/.../
Also do not initialize RAM at every system restart
Hi Aryan,
I have a variable of below type and I want to retain this value after the system wakeup from the system off mode. Can you please provide me the complete code for the retaining this value. I am using SDK 6 ,nRF3.1 version controller and SD s110.
unsigned char ManufacturerData[30] ;
Hi Aryan,
I have a variable of below type and I want to retain this value after the system wakeup from the system off mode. Can you please provide me the complete code for the retaining this value. I am using SDK 6 ,nRF3.1 version controller and SD s110.
unsigned char ManufacturerData[30] ;