<?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>RAM retention after a pin reset</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71900/ram-retention-after-a-pin-reset</link><description>I have a design using nRF52832, and I&amp;#39;m hoping to use RAM set before a pin reset is applied. But, at least with a debugger attached, RAM appears to be randomised through a reset. 
 This is with the S132 softdevice present. I can keep noinit through a</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Feb 2021 12:09:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71900/ram-retention-after-a-pin-reset" /><item><title>RE: RAM retention after a pin reset</title><link>https://devzone.nordicsemi.com/thread/296234?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2021 12:09:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1915306e-9ee7-42e1-ae51-fd6acd41e47e</guid><dc:creator>buddi_nordic</dc:creator><description>&lt;p&gt;I am actually keeping a log (CRCed) in no-init memory. I&amp;#39;m pretty sure (have to look agin) that it survives a watchdog reset without losing the log contents. But a pin reset seems to randomise most memory.&lt;/p&gt;
&lt;p&gt;From the looks of it, I COULD keep data in RAM if I use some sophisticated recovery schemes like reed-solomon or something. Not going that way though. Roughly 30% bit-flips on the memory contents.&lt;/p&gt;
&lt;p&gt;To keep that log, I&amp;#39;ll have to write it flash then.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RAM retention after a pin reset</title><link>https://devzone.nordicsemi.com/thread/295795?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2021 10:32:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35156fc8-584d-430a-9239-0e8ad1a477f4</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Yes, the table shows which targets are reset by which reset source, so the &amp;#39;x&amp;#39; mean that the target is reset.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This means that the RAM is &amp;quot;reset&amp;quot; by a watchdog reset as well. Notice the note on the page: &lt;em&gt;&amp;quot;The RAM is never reset, but depending on reset source, RAM content may be corrupted&amp;quot;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;If it is not super critical that the variable is retained through reset, you could set aside a separate no-init section in RAM that is not used by the rest of the application, where you store the variable together with a CRC value that is used to verify the integrity of the data. If this is not an option, you need to store the data in flash.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RAM retention after a pin reset</title><link>https://devzone.nordicsemi.com/thread/295738?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2021 07:48:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da0eb3ed-6d76-42f8-978b-0d277d93ea50</guid><dc:creator>buddi_nordic</dc:creator><description>&lt;p&gt;Hi Jorgen,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the response. I did see that table, but couldn&amp;#39;t interpret it, there is nothing saying what the &amp;#39;x&amp;#39; means. It should be interpreted as not retained then? I see that it is amrked as not retained through a watchdog reset too?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RAM retention after a pin reset</title><link>https://devzone.nordicsemi.com/thread/295708?ContentTypeID=1</link><pubDate>Mon, 22 Feb 2021 19:20:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:426bfb9f-2c22-4ff0-8906-1e0905c29231</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;RAM is not retained through a pin reset, you can see a table of which peripheral is reset by each reset source on &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html#unique_832471788"&gt;this page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;&lt;span&gt;SxRETENTION registers are used to turn on/off RAM retention during System OFF mode.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If you need to retain data through a pin reset you need to store it in flash. The &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_fds.html"&gt;FDS library&lt;/a&gt; can be used for this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>