<?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>wdt best practice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11003/wdt-best-practice</link><description>Hey, 
 I have been trying to set up wdt for my application which services some interrupts once in a while and advertises continuously. I put the nrf to sleep using sd_app_evt_wait() function. I am using a custom board with nrf51822. 
 I followed two</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Jan 2016 14:23:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11003/wdt-best-practice" /><item><title>RE: wdt best practice</title><link>https://devzone.nordicsemi.com/thread/41138?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2016 14:23:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80188df2-5e6b-49b8-8bd6-7503f2862f31</guid><dc:creator>Allen Foster</dc:creator><description>&lt;p&gt;Yes, by writing to a specific WDT register. There are just as many other ways I could break a system with &amp;#39;faulty software&amp;#39; by writing to specific memory or register locations, it should be noted that a WDT would not necessarily be able to recover from these.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: wdt best practice</title><link>https://devzone.nordicsemi.com/thread/41139?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2016 14:09:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fea12ee5-c85b-48b0-a035-6b4d5457acab</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;The trouble, of course, with a WDT that can be stopped once started is that it gives a loophole for faulty software to stop the WDT when it shouldn&amp;#39;t!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: wdt best practice</title><link>https://devzone.nordicsemi.com/thread/41137?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2016 13:44:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f2fbf87-0d7c-4d80-8ec9-ea0c2922444f</guid><dc:creator>Allen Foster</dc:creator><description>&lt;p&gt;Hi Nordic,&lt;/p&gt;
&lt;p&gt;Do you have any plans to change the WDT so that it&amp;#39;s period can be changed, or that it can be disabled once started?&lt;/p&gt;
&lt;p&gt;Whilst I agree in principle that a WDT should always be well integrated and serviced in an embedded system there are cases when it would be extremely useful to be able to disable it. The reality of modern FOTA updated embedded systems is that HW and FW issues arise that often require careful workarounds in firmware. &lt;strong&gt;Having a WDT that is locked out from changes once enabled is poor and inflexible design in my opinion.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I say this as someone with 10+ years RTL and firmware design experience working on media entertainment SoC designs.&lt;/p&gt;
&lt;p&gt;Please change this in future versions of the device!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: wdt best practice</title><link>https://devzone.nordicsemi.com/thread/41136?ContentTypeID=1</link><pubDate>Tue, 29 Dec 2015 08:57:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d245b79c-dea6-4be9-968d-0dc7726cef6a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Vandita: Yes, I think it should be fine, watchdog should be feeded in the context with lowest priority (with the timeout longer than the max latency can be created by higher priority interrupts)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: wdt best practice</title><link>https://devzone.nordicsemi.com/thread/41135?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2015 15:46:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b635cacb-6a59-4e6b-9db8-32f4b24efc8c</guid><dc:creator>Vandita</dc:creator><description>&lt;p&gt;Thanks Hung. As I was reading, feeding the dog inside of events/interrupts will also not be a good idea, right? like on_ble_evts. but feeding it from other functions called from main loop after an event has been serviced should be good?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: wdt best practice</title><link>https://devzone.nordicsemi.com/thread/41133?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2015 15:41:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aad410a3-775e-413d-bd78-9650276475b4</guid><dc:creator>Vandita</dc:creator><description>&lt;p&gt;Good point raised. Few minutes after your comment, I even saw an example of where the system was stuck but no reset happened. Thanks for the links as well. Really helpful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: wdt best practice</title><link>https://devzone.nordicsemi.com/thread/41134?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2015 11:38:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e06cc6a9-8eb0-401d-891d-bff53f8c36de</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Vandita,&lt;/p&gt;
&lt;p&gt;I would opt for option 2. I don&amp;#39;t really like the idea of using timer to trigger watchdog. Note that the timer interrupt handle will be preempted by the softdevice events. Maybe that&amp;#39;s why you see lots of reset before you feed the dog in the on_ble_evt.&lt;/p&gt;
&lt;p&gt;I think putting the watchdog in the main loop (that will be returned everytime an event wakes the CPU up) and put the WDT to sleep when the CPU is sleeping is a good choice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: wdt best practice</title><link>https://devzone.nordicsemi.com/thread/41132?ContentTypeID=1</link><pubDate>Tue, 22 Dec 2015 21:34:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3835c3fe-cbac-4374-8c6e-77d400669038</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;The whole point of a WDT is to prevent code execution getting &amp;quot;stuck&amp;quot; or &amp;quot;lost&amp;quot;. So using a timer is a particularly bad idea, as the main code can get &amp;quot;stuck&amp;quot; or &amp;quot;lost&amp;quot; while the timer merrily ticks away in the background.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://betterembsw.blogspot.co.uk/2014/05/proper-watchdog-timer-use.html"&gt;betterembsw.blogspot.co.uk/.../proper-watchdog-timer-use.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.ganssle.com/articles/watchdogsredux.htm"&gt;www.ganssle.com/.../watchdogsredux.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.ganssle.com/watchdogs.htm"&gt;www.ganssle.com/watchdogs.htm&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>