<?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 in bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10230/wdt-in-bootloader</link><description>I have a nrf51-DK, SDK 9.0, S110, dual-bank bootloader that supports both serial and ble protocols, developed using GCC/Eclipse. My application uses the watchdog timer. I have the ability to switch to the bootloader from the app using a button press in</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 Nov 2015 01:10:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10230/wdt-in-bootloader" /><item><title>RE: WDT in bootloader</title><link>https://devzone.nordicsemi.com/thread/37982?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 01:10:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cc8de27-7b0d-46e6-8e55-e3e18218bdde</guid><dc:creator>Brian</dc:creator><description>&lt;p&gt;Thank you Vidar! This solved my issue!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WDT in bootloader</title><link>https://devzone.nordicsemi.com/thread/37981?ContentTypeID=1</link><pubDate>Mon, 23 Nov 2015 09:57:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53138cce-1345-4a4d-ae03-28b322dbf089</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;It will always be NRF_WDT-&amp;gt;RR[0] = WDT_RR_RR_Reload; if you only allocated on channel in your application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WDT in bootloader</title><link>https://devzone.nordicsemi.com/thread/37980?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2015 17:20:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f949dde-923b-4205-8b63-fb7208b2cffb</guid><dc:creator>Brian</dc:creator><description>&lt;p&gt;Good point!  When I start the wdt in my app, I&amp;#39;m calling nrf_drv_wdt_channel_alloc and passing the address of an nrf_drv_wdt_channel_id variable.  When I then execute sd_nvic_SystemReset() and my bootloader starts to execute, this variable has been reset.  So what is the recommended way to maintain this data so that it is available in my bootloader following a reset?  Even if I do maintain this value, haven&amp;#39;t the values inside nrf_drv_wdt.c all been reset, such as m_state, m_alloc_index, etc.   Is there any example code which maintains a watchdog timer across a reset event?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WDT in bootloader</title><link>https://devzone.nordicsemi.com/thread/37978?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2015 14:56:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e93747f-c2e1-4f18-8c7b-fc63fc5f4d6b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Are you sure that you are reloading the correct register in the bootloader? =&amp;gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_WDT-&amp;gt;RR[channel id] = WDT_RR_RR_Reload;
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WDT in bootloader</title><link>https://devzone.nordicsemi.com/thread/37983?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2015 21:53:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71fbb4c3-4f38-4960-a037-01ebdb423966</guid><dc:creator>Brian</dc:creator><description>&lt;p&gt;The board resets after about 2 seconds.  I&amp;#39;m using the NRF_DRV_WDT_DEAFULT_CONFIG define to set up the wdt, which reload_value of 2000.  I bumped this up to 5000, and now my board resets after about 5 seconds.  So I&amp;#39;m certain that the wdt is causing the reset.  As I said before, if I comment out my call in my app which sets up the wdt, everything works fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WDT in bootloader</title><link>https://devzone.nordicsemi.com/thread/37979?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2015 09:01:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aad531db-edbd-4c83-8bf2-db07814804b3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;How long does it take before it resets? Note that the bootloader will reset itself after 2 minutes. You could try to increase the WDT timeout in your app as well to see if it makes any difference. Also, just to be sure, read the NRF_POWER-&amp;gt;RESETREAS (&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.pdf.rm/nRF51_RM_v3.0.pdf"&gt;nrf51 RM)&lt;/a&gt; on bootloader startup to verify that it was reset by WDT, and not an assert.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WDT in bootloader</title><link>https://devzone.nordicsemi.com/thread/37977?ContentTypeID=1</link><pubDate>Wed, 18 Nov 2015 21:28:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:742007a1-0993-4004-88ff-83d40fba21c2</guid><dc:creator>Brian</dc:creator><description>&lt;p&gt;Thanks for the suggestions Vidar.  My original code had a 500 ms timer to feed the watchdog.  Even at 50 ms, I could see the LED flashing for several seconds which I was also toggling on the timer callback.  I increased the timer frequency to 100 ms.  I see the LED blinking faster now for several seconds, but then the board resets.  I also added the code to feed the watchdog from wait_for_events(), but that didn&amp;#39;t help either.  Any idea why I&amp;#39;m unable to feed the watchdog in the bootloader?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WDT in bootloader</title><link>https://devzone.nordicsemi.com/thread/37976?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2015 08:22:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01428250-8a35-423d-bc27-d75db4594d91</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The WDT keeps running in DFU mode as well as you&amp;#39;ve noticed. So it needs to be reloaded in the bootloader. So it seems like the wd_feed_timeout_handler() is not being called in time, or that the interval is too short.&lt;/p&gt;
&lt;p&gt;Another alternative to creating an additional timer instance is to add nrf_drv_wdt_feed() function to the wait_for_events() loop in bootloader.c. Thus, WDT will be reloaded whenever an event has occurred. Just change the  APP_ADV_TIMEOUT_IN_SECONDS to also get events when advertising openly (advertising will restart automaticcally on timeout events, so no actual timeout).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>