<?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>Watchdog reset during DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/108983/watchdog-reset-during-dfu</link><description>Hello, 
 While working on the DFU, I can&amp;#39;t get MCUBoot to complete a slot swap ... The device always is reset due to the watchdog. 
 The watchdog is setup in the app. I know that once it is started, it can&amp;#39;t be stopped; which is shy the bootloader should</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 18 Mar 2024 10:02:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/108983/watchdog-reset-during-dfu" /><item><title>RE: Watchdog reset during DFU</title><link>https://devzone.nordicsemi.com/thread/474255?ContentTypeID=1</link><pubDate>Mon, 18 Mar 2024 10:02:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30905dac-3283-4319-bfca-f33a4fe5126b</guid><dc:creator>Vincent44</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;I set aside this issue to continue developping other parts of the project.&lt;/p&gt;
&lt;p&gt;Now back to it, I no longer have issue with watchdog during DFU. Not tsure I modified some inits, kconfig, or anything else, but everything works as expected now.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Watchdog reset during DFU</title><link>https://devzone.nordicsemi.com/thread/473471?ContentTypeID=1</link><pubDate>Tue, 12 Mar 2024 14:41:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:777f57ad-ac49-4f3b-aa7e-659e9d9b0aca</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have been looking more into this and testing, but I am not able to reproduce it with nRF Connect SDK 2.5.2 (currently the latest). Which SDK version are you using?&lt;/p&gt;
&lt;p&gt;(Note that&amp;nbsp;BOOT_WATCHDOG_FEED is enabled by default if the watchdog is enabled, and as mentionned it reads the WDT registers so no configuration is needed, so normally this is not something you need to think about at all.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Watchdog reset during DFU</title><link>https://devzone.nordicsemi.com/thread/473379?ContentTypeID=1</link><pubDate>Tue, 12 Mar 2024 09:38:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:035f6470-8d3e-42d7-aaf8-0458fc73c246</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am sorry for the late reply.&lt;/p&gt;
[quote user="Vincent44"]&lt;p&gt;If I increase the watchdog to 35 sec, I have no problem.&lt;/p&gt;
&lt;p&gt;While increasing the timer is acceptable for my application, I have the feeling that it&amp;#39;s just a solution to move around the initial problem&lt;/p&gt;[/quote]
&lt;p&gt;I agree. The watchdog should be fed in between writing chunks, so ther seems to be an issue here. I need to look into it and get back to you.&lt;/p&gt;
[quote user="Vincent44"]Is there any specific configuration to have on the watchdog ?[/quote]
&lt;p&gt;No, feedign of the watchdog should work out of the box when enabled (it is possible to read all relevant information direclty from the WDT peripheral registers, so configuration is not needed).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Watchdog reset during DFU</title><link>https://devzone.nordicsemi.com/thread/472547?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2024 15:38:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bab8573a-8981-4f8b-b8ff-76661f4e01a5</guid><dc:creator>Vincent44</dc:creator><description>&lt;p&gt;Thanks for you quick reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The overall process to move the app to primary slot seems to take ~25 sec.&lt;/p&gt;
&lt;p&gt;If I increase the watchdog to 35 sec, I have no problem.&lt;/p&gt;
&lt;p&gt;While increasing the timer is acceptable for my application, I have the feeling that it&amp;#39;s just a solution to move around the initial problem. Let&amp;#39;s say that in the future my new image is larger and requires more time to be swapped, what value should I use ?! Isn&amp;#39;t that the whole point of CONFIG_BOOT_WATCHDOG_FEED, to take care of the WDT while in the bootloader ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I wasn&amp;#39;t able to find much details on this topic, aside than using CONFIG_BOOT_WATCHDOG_FEED. Is there any specific configuration to have on the watchdog ? Should it be the Zephyr watchdog (&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/peripherals/watchdog.html#c.wdt_install_timeout)"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/peripherals/watchdog.html#c.wdt_install_timeout)&lt;/a&gt;, the nrf_wdt ( &lt;a id="" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfx/drivers/wdt/driver.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfx/drivers/wdt/driver.html&lt;/a&gt;) ? &lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Watchdog reset during DFU</title><link>https://devzone.nordicsemi.com/thread/472501?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2024 13:54:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f9955cb-5902-491e-ba3c-a3bb05ce866c</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I am not able to give an exact number. What happens if you test with longer timeouts?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Watchdog reset during DFU</title><link>https://devzone.nordicsemi.com/thread/472470?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2024 13:19:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a9a4e26-1a0a-4360-a117-315e892049cd</guid><dc:creator>Vincent44</dc:creator><description>&lt;p&gt;I use a 10 sec timeout. Is that too short ?&lt;/p&gt;
&lt;p&gt;I work with encrypted images, so the swap takes a bit more time than for a non-encrypted.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Watchdog reset during DFU</title><link>https://devzone.nordicsemi.com/thread/472469?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2024 13:16:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d2376cb-6377-4114-acd6-77b623de3c43</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You should not have to do anything else. With this, the watchdog is feed at strategic places in MCUboot with&amp;nbsp;MCUBOOT_WATCHDOG_FEED().&amp;nbsp; Which timeout (reload value) do you use for the watchdog? It if it too short,&amp;nbsp; you can try with a longer timeout.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>