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

With J-link Rtt viewer is opened my app working fine, but without that ram retention values are gone

Hi,

I am retaining a buffer for checking whether it is happening the first time after power on or not.

for the first time, I am keeping predefined values(2 for check initialization, remaining for state maintenance after the system off.

with RTT viewer being opened the values being retained and my app working fine.

but without RTT viewer being opened, the application initializing again and again as it came from power reset.

can anybody point out how to debug this? 

SDK used 17 for NRF52810 custom Board.

Parents
  • Hi,

    Can you post the code you used for configuring RAM retention, and the startup code where the chip resets?

    Are you seeing resets if you start a debug session as well, or does this work?

    Best regards,
    Jørgen

  • Hi,

    I am using the following code for ram retention

    and the following code for checking at startup

    I am using .retained_section for variables to be retained as below

    __attribute__((section(".retained_section"))) eActivity_State eState = eWaitingForEvent;

    and the following line added flash_placement.xml 

    <ProgramSection alignment="4" keep="Yes" load="No" name=".retained_section" address_symbol="__start_retained_section" end_symbol="__stop__retained_section" size="1024" />

    and I think RAM content is not retained if RTT viewer not opened.

    NOTE: It is not going to the error handler.

Reply
  • Hi,

    I am using the following code for ram retention

    and the following code for checking at startup

    I am using .retained_section for variables to be retained as below

    __attribute__((section(".retained_section"))) eActivity_State eState = eWaitingForEvent;

    and the following line added flash_placement.xml 

    <ProgramSection alignment="4" keep="Yes" load="No" name=".retained_section" address_symbol="__start_retained_section" end_symbol="__stop__retained_section" size="1024" />

    and I think RAM content is not retained if RTT viewer not opened.

    NOTE: It is not going to the error handler.

Children
No Data
Related