<?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>Using power Off/On as a  Hard Reset  on nrf51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32978/using-power-off-on-as-a-hard-reset-on-nrf51822</link><description>Hi There 
 I am developing a custom board on NRF51822. I have a noticed that the chip is getting stuck every day and to run it again I need to press a button on/off to reset the system. After that all is working fine till next day..Is it because the WDT</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Apr 2018 13:57:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32978/using-power-off-on-as-a-hard-reset-on-nrf51822" /><item><title>RE: Using power Off/On as a  Hard Reset  on nrf51822</title><link>https://devzone.nordicsemi.com/thread/126675?ContentTypeID=1</link><pubDate>Tue, 03 Apr 2018 13:57:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1a171b4-dfce-4e82-9627-698da14ec627</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;For comparison, I have designed products that run continuously until the battery dies after nearly a year without once the BLE getting &amp;quot;stuck&amp;quot;.&amp;nbsp; You have something wrong with your code or your custom board.&lt;/p&gt;
&lt;p&gt;If you are not going to fix your code or board you should at least fix your WDT. A correctly used WDT will trigger a reset when the product is not working.&amp;nbsp; That is the whole point of a WDT. You have not programmed your WDT correctly.&amp;nbsp; You should fix this.&lt;/p&gt;
&lt;p&gt;With regard to your question about the WDT, page 112 of the nRF51 Series Reference Manual CLEARLY states the state of the WDT after a reset or power cycle:&lt;/p&gt;
&lt;p&gt;&amp;quot;20.1.3 Watchdog reset&lt;br /&gt;A TIMEOUT event will automatically lead to a watchdog reset equivalent to a system reset, see POWER&lt;br /&gt;chapter for more information about reset sources. If the watchdog is configured to generate an interrupt&lt;br /&gt;on the TIMEOUT event, the watchdog reset will be postponed with two 32.768 kHz clock cycles after the&lt;br /&gt;TIMEOUT event has been generated. Once the TIMEOUT event has been generated, the impending&lt;br /&gt;watchdog reset will always be effectuated.&lt;br /&gt;The watchdog must be configured before it is started. After it is started, the watchdog&amp;rsquo;s configuration&lt;br /&gt;registers, which comprises registers CRV, RREN, and CONFIG, will be blocked for further configuration.&lt;br /&gt;The watchdog is reset when the device is put into System OFF mode. The watchdog is also reset when the&lt;br /&gt;whole system is reset, except for when the system is reset through a soft reset, see POWER chapter for&lt;br /&gt;more information about reset types.&lt;br /&gt;When the device starts running again, after a reset, or waking up from OFF mode, the watchdog&lt;br /&gt;configuration registers will be available for configuration again.&amp;quot;&lt;/p&gt;
&lt;p&gt;And for the final question, the SoftDevice does not care if you power cycle constantly.&amp;nbsp; It is a computer and just runs. You as the designer only need to care if you are leaving flash open and not closing it correctly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using power Off/On as a  Hard Reset  on nrf51822</title><link>https://devzone.nordicsemi.com/thread/126634?ContentTypeID=1</link><pubDate>Tue, 03 Apr 2018 11:07:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:170cf645-657f-4789-b7b2-44c25d7e2cb7</guid><dc:creator>f1rew4ll</dc:creator><description>&lt;p&gt;Thank you for that quick reply. In therms of my code, I do not&amp;nbsp; thing that my code causes ble stuck as I turn off all function that been used and I only left the&amp;nbsp; function where the ble is advertising. The same thing, I could discover BLE on my phone that day but it gone day after. Once recycled the power the BLE back on. So my question is. if I recycle the power does it mean the WDT &amp;nbsp;is recycled as well? and also does the BLE like to be switch off/on every day?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using power Off/On as a  Hard Reset  on nrf51822</title><link>https://devzone.nordicsemi.com/thread/126520?ContentTypeID=1</link><pubDate>Mon, 02 Apr 2018 13:28:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08a5d744-4f34-4903-bc53-f5d9dd25c141</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;The utility in a WDT is to reset the device when normal operation has stopped.&amp;nbsp; Generally a cessation of normal function can be seen after a few seconds.&amp;nbsp; So, a 36 hour timeout doesn&amp;#39;t really utilize the function of a WDT.&lt;/p&gt;
&lt;p&gt;You can do a chip reset any way you wish (eg, power cycle, reset pin, dedicated gpio, wdt timeout). The only thing you need to keep track of is if you are writing to flash. However, since your code is dead there is no hope of properly closing flash.&lt;/p&gt;
&lt;p&gt;You should start first by coming up with a realistic WDT number based on your code.&amp;nbsp; Think seconds not hours. Then find a critical function to put the WDT refresh into that is known to run more often than the timeout. Sometimes people put the wdt refresh in main with the power manage, I prefer putting it into code associated with radio activity.&amp;nbsp; Then I know if something went wrong with the Softdevice.&lt;/p&gt;
&lt;p&gt;Then you should debug your code.&amp;nbsp; There is no reason for embedded application to crash. You did something wrong in your code and it needs to be fixed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>