<?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>nRF52840 ncs Watchdog resets</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93308/nrf52840-ncs-watchdog-resets</link><description>I have not been able to get the nRF52840 ncs v2.0.2 watchdog not to reset. 
 I tried kicking the watchdog every second and can set a break point and see that the kick does not return an error. 
 After a couple of minutes the board resets with the debugger</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Oct 2022 13:26:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93308/nrf52840-ncs-watchdog-resets" /><item><title>RE: nRF52840 ncs Watchdog resets</title><link>https://devzone.nordicsemi.com/thread/392849?ContentTypeID=1</link><pubDate>Thu, 27 Oct 2022 13:26:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72fc98b8-446f-4b5b-849a-05dda8ec4cba</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Good to hear about the WDT issue.&lt;/p&gt;
&lt;p&gt;Regarding DFU, I see your point, but that is what we provide. Note that a colleague of mine is also working on a unofficial SMP client to do DFU from an MCU, which you can look at: &lt;a href="https://github.com/simon-iversen/ncs_samples/tree/master/central_smp_client_dfu"&gt;central_smp_client_dfu&lt;/a&gt;. I suggest opening a new case for DFU if needed though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 ncs Watchdog resets</title><link>https://devzone.nordicsemi.com/thread/392816?ContentTypeID=1</link><pubDate>Thu, 27 Oct 2022 12:09:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19750c56-bd38-4ad8-8da9-3c55491e86f6</guid><dc:creator>DavidKaplan</dc:creator><description>&lt;p&gt;Thanks for your quick response.&lt;/p&gt;
&lt;div&gt;&lt;span&gt;I could see when I connect BLE to the peripheral, that my seconds variable increments every second, so the watchdog kick is being called.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;After looking at the watchdog sample, I saw that the watchdog options parameter was set for debug.&lt;/div&gt;
&lt;p&gt;I was also calling my&amp;nbsp;ami_watchdog_Init() function twice in my initialization proceed by mistake which could be the real reason for the resets (I do not know since I did not investigate the Zephyr Nordic code).&lt;/p&gt;
&lt;p&gt;After these changes, the peripheral does not reset with the debugger connected.&lt;/p&gt;
&lt;p&gt;I will test it without&amp;nbsp;the debugger and also in my Central code which had the same mistakes.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;err&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;wdt_setup&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;wdt&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;strong&gt;WDT_OPT_PAUSE_HALTED_BY_DBG&lt;/strong&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;About the DFU, I can see that it looks like it uses ZCBOR &amp;amp; SMP which greatly complicates my Central&amp;#39;s host code which is currently not a Nordic chip.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Thank you again,&amp;nbsp;David&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 ncs Watchdog resets</title><link>https://devzone.nordicsemi.com/thread/392798?ContentTypeID=1</link><pubDate>Thu, 27 Oct 2022 11:21:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:978ea7c4-3b9b-4e2f-840a-7b56659b46ee</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I do not see enough of your code to be sure that you are seeing a WDT reset. Have you confirmed that? I ask as you print&amp;nbsp;ResetCause:1, and if that means that RESETREAS is 1, that is pinreset. Perhaps you can explain where this number comes from?&lt;/p&gt;
&lt;p&gt;Regarding&amp;nbsp;the WDT code snippets you have include&amp;nbsp;that looks sensible (though I do not have a full overview of the other code and I might have overlooked something) It looks like you have based it on the &lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/drivers/watchdog/src/main.c"&gt;Watchdog Driver Sample&lt;/a&gt;, which is a sensible starting point, and this runs out of the box on a nRF52840 DK.&lt;/p&gt;
[quote user=""]I did not see any bootloader in the nRF52840&amp;#39;s pdf, so I must use the SMP protocol or do things myself with the Zephyr code?[/quote]
&lt;p&gt;We provide DFU capability in the nRF Connect SDK as well, based on the MCUboot bootloader. You can read more about it under &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.1.1/nrf/app_bootloaders.html"&gt;Bootloaders and Device Firmware Updates&lt;/a&gt;. You may also find these unofficial &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples"&gt;bootloader samples&lt;/a&gt; useful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>