<?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>how can I retain RAM after watchdog reset and bootloader present</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12134/how-can-i-retain-ram-after-watchdog-reset-and-bootloader-present</link><description>Im using nrf51822 (16KB RAM), I&amp;#39;m trying to retain some data (RAM) after watchdog reset. when I load only the softdevice and my app, the RAM retention workings, but when I used it with bootloader, the data is always reset. I use this customized scatter</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 02 Mar 2016 08:17:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12134/how-can-i-retain-ram-after-watchdog-reset-and-bootloader-present" /><item><title>RE: how can I retain RAM after watchdog reset and bootloader present</title><link>https://devzone.nordicsemi.com/thread/45902?ContentTypeID=1</link><pubDate>Wed, 02 Mar 2016 08:17:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b110a92-3487-46dd-9e9f-9735a955e563</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I have updated the answer to cover the situation where you use a bootloader.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can I retain RAM after watchdog reset and bootloader present</title><link>https://devzone.nordicsemi.com/thread/45901?ContentTypeID=1</link><pubDate>Tue, 01 Mar 2016 13:26:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b81e649-f1dc-45bb-9740-079f05f156a0</guid><dc:creator>makouda</dc:creator><description>&lt;p&gt;I noticed that when I keep above variable out of bootloader RAM range it works fine.  is that mean that the RAM is affected by the bootlader even when the bootloader is not running???&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;bootloader RAM configuration&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/bootlaoder.png" alt="image description" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can I retain RAM after watchdog reset and bootloader present</title><link>https://devzone.nordicsemi.com/thread/45900?ContentTypeID=1</link><pubDate>Mon, 29 Feb 2016 13:15:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09faea67-003e-437a-a040-4183ab4daac6</guid><dc:creator>makouda</dc:creator><description>&lt;p&gt;I noticed that when I dont use boot loader, it&amp;#39;s working (RAM retention working) but when I flash the bootloader, it&amp;#39;s not working. what could be the problem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can I retain RAM after watchdog reset and bootloader present</title><link>https://devzone.nordicsemi.com/thread/45898?ContentTypeID=1</link><pubDate>Sat, 27 Feb 2016 03:30:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:465f49b5-e950-4613-9b87-d9e46625464d</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;.. comment removed as I now see two different loads of documentation about what &amp;#39;zero_init&amp;#39; means.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can I retain RAM after watchdog reset and bootloader present</title><link>https://devzone.nordicsemi.com/thread/45899?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2016 13:55:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:241ca050-7d82-4678-82e8-62d8b51d2d0e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Please refer to &lt;a href="https://devzone.nordicsemi.com/question/69279/retain-a-ram-value-after-a-watchdog-timeout/?answer=69528#post-id-69528"&gt;this answer&lt;/a&gt; to a very similar question.&lt;/p&gt;
&lt;p&gt;The suggested solution for that case does not work for you, but the initial part of the answer is: the reset behavior table found in section 12.1.19 of the nRF51 &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf51/dita/nrf51/pdflinks/ref_manual.html?cp=2_2"&gt;RM&lt;/a&gt; states that &lt;strong&gt;RAM content may be corrupted for all reset sources but CPU lockup and softreset&lt;/strong&gt;. This means that even if you do everything by the book with regard to RAM retention, you still risk the data being corrupted after a watchdog reset. So what you ask is &lt;em&gt;not possible&lt;/em&gt; on the nRF51 HW, as you cannot be confident that RAM data is valid after a watchdog reset.&lt;/p&gt;
&lt;p&gt;Your updated question asks about differenced using bootloader or not. The bootloader is always run at startup if it is flashed, though it will not do much in the normal case where there is no upgrade ongoing. It will do some basic configuration (configure LED&amp;#39;s, enable timer and GPIO for button etc) and check whether it is in the process of upgrading or not, and if there is a valid application. Then it will start the application. This means that you risk losing data that is stored in the RAM area for the bootloader, also when not upgrading.&lt;/p&gt;
&lt;p&gt;So in your case you have two separate issues that can make your data corrup:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;RAM content may be corrupted after watchdog reset&lt;/li&gt;
&lt;li&gt;Bootloader will use some of it&amp;#39;s RAM at startup even if no upgrade is ongoing.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can I retain RAM after watchdog reset and bootloader present</title><link>https://devzone.nordicsemi.com/thread/45897?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2016 09:50:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79e76c5a-a1d4-45a5-9cb1-567a294b6248</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;I am not sure, but additionally to things you implemented (modified .sct file and &lt;strong&gt;attribute&lt;/strong&gt;) I also have &amp;quot;NoInit&amp;quot; for IRAM2 ticked in &amp;quot;target&amp;quot; tab in target options in keil. Maybe you could try that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>