<?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>Retain Some Peripherals status after a watchdog reset over nRF52</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/26927/retain-some-peripherals-status-after-a-watchdog-reset-over-nrf52</link><description>I write an application on nRF52 where the Watchdog Timeout event should automatically clear a GPIO and start a PWM signal on another GPIO using PPI. 
 The issue is that Watchdog timer will always reset the chip and hence reset the peripherals including</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Nov 2017 18:32:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/26927/retain-some-peripherals-status-after-a-watchdog-reset-over-nrf52" /><item><title>RE: Retain Some Peripherals status after a watchdog reset over nRF52</title><link>https://devzone.nordicsemi.com/thread/105797?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2017 18:32:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dc3d9db-8e04-4fc9-ace8-3452d07790eb</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;There are a lot of ways.&lt;br /&gt;
You can write periodically to flash.&lt;br /&gt;
You can write to the UICR registers.
You can also use the GPREGRET registers.&lt;/p&gt;
&lt;p&gt;If you want a super simple approach, the ram is not initialized on boot.  So people have also just left data in static variables that they don&amp;#39;t init (ie, set to zero).  Or, they selectively init when they know they didn&amp;#39;t just come out of a WDT reset. As long as you don&amp;#39;t power down  or brownout your static variable will be there.&lt;/p&gt;
&lt;p&gt;With all these methods you will still need to write back the state of the various peripherals you mentioned after the reset event.  But it will give you a way to recover to roughly the last state of the device.&lt;/p&gt;
&lt;p&gt;Though I should point out that people will ask why you are expecting so many WDT events?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>