Hi everyone,
I am new to this and I need your advice and help. I am using Segger IDE to develop an aplication along with Nordic's SDK. I have to retain the value of one variable and do not be initialized after system reset. In order to achieve this I have to put RAM in retention and also to place my variable into a special program section in order to avoid initialization after reset. Digging around I found that in order to achieve this I have to add this variable into a program section called .non_Init that is under the RAM memory segment inside the flash_placement.xml file. In order to do this I have to declare the variable like this:
See also the attachment with program section.
I am correct so far?
Nordic provides the API to put RAM in retention. More specifically I can put a particular RAM section in retention instead of the full RAM size (this will decrease my current consuption). However, to put a paticular RAM section in retention I need to know the memory address of my variable (in order to see in what RAM section it is located) and to ensure that it is not changing. How can I find the start address and size of .non_init section?
Or is there any other approach I can follow? I am a beginner so please keep things simple
Thanks in advance
Nick
I am new to this and I need your advice and help. I am using Segger IDE to develop an aplication along with Nordic's SDK. I have to retain the value of one variable and do not be initialized after system reset. In order to achieve this I have to put RAM in retention and also to place my variable into a special program section in order to avoid initialization after reset. Digging around I found that in order to achieve this I have to add this variable into a program section called .non_Init that is under the RAM memory segment inside the flash_placement.xml file. In order to do this I have to declare the variable like this:
See also the attachment with program section.
I am correct so far?
Nordic provides the API to put RAM in retention. More specifically I can put a particular RAM section in retention instead of the full RAM size (this will decrease my current consuption). However, to put a paticular RAM section in retention I need to know the memory address of my variable (in order to see in what RAM section it is located) and to ensure that it is not changing. How can I find the start address and size of .non_init section?
Or is there any other approach I can follow? I am a beginner so please keep things simple
Thanks in advance
Nick
The post was edited 1 time, last by Nikosant03 ().