<?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>Is GPREGRET preserved across toggle of nRESET?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/8159/is-gpregret-preserved-across-toggle-of-nreset</link><description>I&amp;#39;m trying to use gpreg for state across toggles of nRESET. I thought it was working, but when I tested it on hardware without jtag connected it seemed that gpreg was getting reset as well. 
 Before I go down the path of trying something else, should</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Jul 2015 06:28:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/8159/is-gpregret-preserved-across-toggle-of-nreset" /><item><title>RE: Is GPREGRET preserved across toggle of nRESET?</title><link>https://devzone.nordicsemi.com/thread/29333?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2015 06:28:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08bcf5ae-6818-49ec-8363-e4fb26a593e0</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;It would be nice if you come back with your test results. Seems like some hardware issue, but I think WDT is well tested peripheral and hope that it is some thing else related to software.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is GPREGRET preserved across toggle of nRESET?</title><link>https://devzone.nordicsemi.com/thread/29332?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2015 05:18:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ce8bc7e-d2b9-432c-9e17-38c461c74df6</guid><dc:creator>Clem Taylor</dc:creator><description>&lt;p&gt;It isn&amp;#39;t clear from the docs if sram is cleared on &amp;#39;pin reset&amp;#39;. I can&amp;#39;t imagine you would spend all the extra gates on a global reset for the sram block (not to mention the current draw of clearing all those bits when coming out of reset).  I moved my &amp;#39;flag&amp;#39; to the last 4 bytes of SRAM and again it works fine in the gdb, but doesn&amp;#39;t seem to without jtag. Maybe my &amp;#39;pin reset&amp;#39; macro isn&amp;#39;t the same as stomping on the pin.&lt;/p&gt;
&lt;p&gt;I am already under extreme flash pressure as it is, can&amp;#39;t waste another page on a &amp;#39;just in case&amp;#39; feature and I generally avoid writing to the flash for longevity reasons.&lt;/p&gt;
&lt;p&gt;The bootloader reads, but doesn&amp;#39;t write to RESETREAS, the application side reads and clears RESETREAS. I was commenting out the WDT ack and just letting it reset and some of the time I was seeing the DOG bit set when I reset back into the bootloader and other times it was cleared (I think it looked like a fresh power on). I stuck a gpio write in the WDT_IRQHandler() and watched it on the scope and saw the pin being asserted and released across the watchdog reset. I will have to repeat the test and look more closely.  I just need to log to the host that the watchdog timer went off or we threw an assert.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is GPREGRET preserved across toggle of nRESET?</title><link>https://devzone.nordicsemi.com/thread/29331?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2015 07:05:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afa5731e-3db4-43c3-b201-3dac27274b50</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;If you go to Power chapter and see &amp;quot;Reset Behaviour&amp;quot; section
You will find that GPREGRET (retained registers) is only preserved for CPU lockup+Soft reset+Wakeup from SystemOFF.&lt;/p&gt;
&lt;p&gt;nReset is pin reset. So the register will be cleared. Why don&amp;#39;t you just write to application registered flash area? they will stay there, use pstorage update to update the flash content. I know that it will be slow, but I think there is no better solution for you.&lt;/p&gt;
&lt;p&gt;Are you clearing the register bits of the RESETREAS after you check them.
The only known anamoly for POWER-&amp;gt;RESETREAS on latest nRF51 kits is
41. POWER RESETREAS register may erroneously indicate LOCKUP.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>