<?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>RESETREAS DOG without WDT Handler Firing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47581/resetreas-dog-without-wdt-handler-firing</link><description>SDK 15.2, nrf52840 SD 6.1 
 I&amp;#39;m having an issue where a reset with RESETREAS DOG 0x02 is not coming through the WDT handler before executing reset. I can force this reset by jumping into a while(1) spin loop, but the WDT expired handler does not fire</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Aug 2020 06:35:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47581/resetreas-dog-without-wdt-handler-firing" /><item><title>RE: RESETREAS DOG without WDT Handler Firing</title><link>https://devzone.nordicsemi.com/thread/262696?ContentTypeID=1</link><pubDate>Mon, 03 Aug 2020 06:35:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f0fea67-cac9-4540-9972-95c3c76aab78</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Interrupt priority 0 is reserved to the Softdevice, hence the assertion. But you can work around this by calling &amp;#39;NVIC_SetPriority(WDT_IRQn, 0);&amp;#39; after enabling the Softdevice.&lt;/p&gt;
&lt;p&gt;As a test to confirm if the WD callback is indeed blocked by another interrupt, please try to add an infinite loop after &amp;#39;&lt;span&gt;wdt_enable&lt;/span&gt;&amp;#39; in main context, then check again if the WD callback doesn&amp;#39;t come through.&lt;/p&gt;
&lt;p&gt;e.g.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;int main()&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;{&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;...&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span&gt; wdt_enable&lt;/span&gt;();&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;for(;;); // Wait here until the WD times out&lt;/p&gt;
&lt;p&gt;..&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RESETREAS DOG without WDT Handler Firing</title><link>https://devzone.nordicsemi.com/thread/262688?ContentTypeID=1</link><pubDate>Mon, 03 Aug 2020 03:41:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a27b7dd2-eca7-4d09-9293-5da852e56c72</guid><dc:creator>jacksong</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I ran into the same problem, and after patch this code, problem still.&lt;/p&gt;
&lt;p&gt;test with:&lt;/p&gt;
&lt;p&gt;set nrf_drv_wdt_init with&amp;nbsp;interrupt_priority 0 will trigger a ASSERT ERROR by&amp;nbsp;INTERRUPT_PRIORITY_IS_VALID(pri)&lt;/p&gt;
&lt;p&gt;so, try to&amp;nbsp;insert&amp;nbsp;&lt;span&gt;NVIC_SetPriority(WDT_IRQn, 0);&amp;nbsp;between&amp;nbsp;wdt_init and wdt_enable&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;But, test result is can&amp;#39;t catch wdt_timeout_hanlder in debug(just Reset)&lt;/p&gt;
&lt;p&gt;Is there a better answer or tutorial, currently updated&lt;/p&gt;
&lt;p&gt;Thand you advance&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RESETREAS DOG without WDT Handler Firing</title><link>https://devzone.nordicsemi.com/thread/188833?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 13:03:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63562e04-0d36-472b-8502-b8dcf29fd62f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Ah, the WDT&amp;nbsp;ISR is probably being blocked by another interrupt of the same or higher priority. Please try to set it to have the highest priority after enabling the Softdevice:&lt;/p&gt;
&lt;p&gt;NVIC_SetPriority(WDT_IRQn, 0);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RESETREAS DOG without WDT Handler Firing</title><link>https://devzone.nordicsemi.com/thread/188828?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 12:49:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c4eda37-c085-403a-9313-9ed8eb9fed79</guid><dc:creator>JeffW</dc:creator><description>&lt;p&gt;After trying a few things this is my new experience:&lt;br /&gt;I can put a while(1) loop anywhere in main after the WDT is enabled, and it falls through the WDT handler before reset as expected.&amp;nbsp;&lt;br /&gt;But if I send a NUS command that schedules (app_sched_event_put) a while(1) loop, it does not seem to go through the WDT handler before resetting.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RESETREAS DOG without WDT Handler Firing</title><link>https://devzone.nordicsemi.com/thread/188597?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 13:42:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bdc1370-bc49-414b-86d4-15d87d48c0a1</guid><dc:creator>JeffW</dc:creator><description>&lt;p&gt;Vidar,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I appreciate you running tests!&lt;br /&gt;The WDT example works as you describes, but this result varies from my real application experience.&lt;br /&gt;Do you know of any interaction with the soft device enabled where a while(1) loop will trigger a WDT reset reason without coming through the WDT handler?&lt;/p&gt;
&lt;p&gt;It&amp;#39;s strange to me, but maybe I&amp;#39;m missing something at a low level.&lt;br /&gt;--Jeff&lt;/p&gt;
&lt;p&gt;Edit: Ran a few tests, my breakpoint and log/flush in the WDT_handler weren&amp;#39;t being spit out in the RTT before reset. I am running a few more tests on this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RESETREAS DOG without WDT Handler Firing</title><link>https://devzone.nordicsemi.com/thread/188588?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 13:15:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e572c48-46ff-43a4-82d0-e31d047c1109</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Jeff,&lt;/p&gt;
&lt;p&gt;Can you try the WDT example in&amp;nbsp;\nRF5_SDK_15.2.0_9412b96\examples\peripheral\wdt to see if you get the same result? I did not manage to reproduce this behavior here.&amp;nbsp;I placed a breakpoint in the&amp;nbsp;wdt_event_handler() and observed that the CPU was halted before the WD had time to reset.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RESETREAS DOG without WDT Handler Firing</title><link>https://devzone.nordicsemi.com/thread/188349?ContentTypeID=1</link><pubDate>Tue, 21 May 2019 15:40:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e523c87e-2982-432b-aca1-69c22d32a2a3</guid><dc:creator>lev</dc:creator><description>&lt;p&gt;Maybe this behaviour is caused by the debugger. See&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/15677/why-does-nrf52-hrs-sdk11-example-sd_power_off-return-6"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/15677/why-does-nrf52-hrs-sdk11-example-sd_power_off-return-6&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>