<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>NRF52840 Soft Reset Ram Retention</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71622/nrf52840-soft-reset-ram-retention</link><description>I am working on putting my NRF52840 to sleep with the RTC running (System ON WFE, not System Off). According to the datasheet, I should be able to call a soft reset and keep my RTC count variable in RAM. 
 However, when debugging this, my RAM rtc count</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Feb 2021 18:33:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71622/nrf52840-soft-reset-ram-retention" /><item><title>RE: NRF52840 Soft Reset Ram Retention</title><link>https://devzone.nordicsemi.com/thread/294471?ContentTypeID=1</link><pubDate>Mon, 15 Feb 2021 18:33:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:063e0b3d-2a26-4d0a-81b5-af823f280cee</guid><dc:creator>LukeC</dc:creator><description>&lt;p&gt;This worked, I just needed to define my variable in the non_init section&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static uint32_t m_time __attribute__((section(&amp;quot;.non_init&amp;quot;)));&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 Soft Reset Ram Retention</title><link>https://devzone.nordicsemi.com/thread/294364?ContentTypeID=1</link><pubDate>Mon, 15 Feb 2021 12:20:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cc50f02-1890-41b9-85cb-478fc840e2f1</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Typically, variables in RAM&amp;nbsp;gets zero initialized during the reset sequence. If they are placed in the&amp;nbsp;.non_init section they will not get&amp;nbsp;zero initialized. You might find&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/48919/ram-retention-settings-with-softdevice-enabled/194367#194367"&gt;this post&lt;/a&gt;&lt;span&gt;&amp;nbsp;useful.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>