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

ram retention nrf52

Hello,

I've taken the example from the SDK 12.0.0 for RAM retention. I've added additional NRF_LOG statements to check if the RAM retention is happening. I do not have the softdevice enabled for my application. But it is not working.

See the main.c

At line number 184, I see that the value RAM_MEMORY_TEST_WORD is stored at RAM address RAM_MEMORY_TEST_ADDRESS. So after performing system off and then again wakeup using button 1, at line number 117, I expect that the value at address RAM_MEMORY_TEST_ADDRESS is displayed in the log. But this is not happening.

I have gone through the post here which talks about taking care of data being zeroed at startup. But even then, it did not work. I'm also attaching the linker file also here Example_App_gcc_nrf52.ld

I also tried with defining the variables using the following code hoping that this variable value will be retained at systemoff and at systemon. But it is not.

static uint8_t VarName __attribute__ ((section(".noinit")));

I also tried to make the changes based on the errata finding documented here in section 3.31. But even that did not help.

Could anyone of you please help? My requirement is to enable RAM retention for a section of memory without using softdevice.

Thanks in advance.

Parents
  • Hello Aryan, I took the hint from your reply to have a section of NOINIT in linker file. I did not use the logic provided above to determine where the variable is placed. I forced it to this NOINIT section while defining it. To make it clear, I edited my question to make it clear what exactly I did. I'm sorry if you are offended that I did not reply to your answer. Please excuse me for that. But even after doing all this, I still do not have an answer how to make the RAM retention work without softdevice. Please let me know if you can support.

Reply
  • Hello Aryan, I took the hint from your reply to have a section of NOINIT in linker file. I did not use the logic provided above to determine where the variable is placed. I forced it to this NOINIT section while defining it. To make it clear, I edited my question to make it clear what exactly I did. I'm sorry if you are offended that I did not reply to your answer. Please excuse me for that. But even after doing all this, I still do not have an answer how to make the RAM retention work without softdevice. Please let me know if you can support.

Children
No Data
Related