<?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>nRF5340 Watchdog (WDT) Specification</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119120/nrf5340-watchdog-wdt-specification</link><description>Hi, I have a question about the WDT documentation in nRF5340 Product Specification v1.6. 
 Question 1: 
 The chapter &amp;quot;Reload Criteria&amp;quot; (7.41.1) is maybe a bit ambiguous defining the exact moment when the watchdog counter register is reloaded with the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Mar 2025 12:23:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119120/nrf5340-watchdog-wdt-specification" /><item><title>RE: nRF5340 Watchdog (WDT) Specification</title><link>https://devzone.nordicsemi.com/thread/525496?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 12:23:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96ee2327-650f-4d73-9cfa-a0d166205cea</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
[quote user=""] Is my assumption correct, that the watchdog is reloaded when the last enabled RR value is written, even if there is a larger delay within the write operations? &lt;strong&gt;And all RR registers are reset at the exact moment when the watchdog reload takes place?&lt;/strong&gt;[/quote]
&lt;p&gt;Correct. If the watchdog is configured to use more than one reload request register,&lt;br /&gt;all these registers must be written to at least once before the watchdog is reloaded.&lt;/p&gt;
[quote user=""]Concerning the REQSTATUS register, does this register represent the condensed information which RR has already requested a reload, and upon watchdog reload, all bits are reset to 0?[/quote]
&lt;p&gt;In this register you will see &amp;quot;1&amp;quot; if the register is enabled(RREN) and has not been &amp;quot;kicked&amp;quot;(RR set), and &amp;quot;0&amp;quot; if register not enabled(RREN) or has been &amp;quot;kicked&amp;quot;(RR set).&lt;/p&gt;
[quote user=""]On a multi-core SoC, like the nRF5340, does the watchdog reset the whole SoC or only the core it is running on?[/quote]
&lt;p&gt;See this link:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf5340/page/chapters/reset/doc/reset.html#ariaid-title7"&gt;https://docs.nordicsemi.com/bundle/ps_nrf5340/page/chapters/reset/doc/reset.html#ariaid-title7&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;Question 4:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The nRF5340&amp;#39;s application core has two WDT instances (WDT0, WDT1). Is on of the WDT instances used by the NRF Connect SDK or Zephyr? It seems like WDT0 is activated in the device tree automatically (also when I create a new board definition with the VS Code tool that doesn&amp;#39;t specify any project-specific WDT related properties). Or are both WDT instances available for NRFX or bare metal programming (e.g. using two different timeouts for real-time interrupt routines and low level handler routines)?&lt;/p&gt;[/quote]
&lt;p&gt;Looks like by default wdt app instance 0 is enabled. instance 1 is disabled(i.e. free to use in &amp;quot;bare-metal&amp;quot; or if you want to implement your own driver. )&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.7.99-ncs2/dts/arm/nordic/nrf5340_cpuapp_peripherals.dtsi#L337"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v3.7.99-ncs2/dts/arm/nordic/nrf5340_cpuapp_peripherals.dtsi#L337&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]Is there a Zephyr driver (and sample project) that just uses the hardware watchdog, without any task-based software-watchdog running in the background (e.g. when real-time behavior is necessary)? Or would it be more feasible to use the watchdog simply with bare metal programming? Implementing a project-specific driver outside of Zephyr should be very straightforward with this great hardware design.[/quote]
&lt;p&gt;This is how underlaying driver looks like:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.7.99-ncs2/drivers/watchdog/wdt_nrfx.c"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v3.7.99-ncs2/drivers/watchdog/wdt_nrfx.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is the API:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/include/zephyr/drivers/watchdog.h"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/main/include/zephyr/drivers/watchdog.h&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you want to use task_wdt subsys:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/main/subsys/task_wdt"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/main/subsys/task_wdt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;or implement your own way to call wdt_feed(), e.g. like done here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/applications/nrf_desktop/src/modules/watchdog.c"&gt;https://github.com/nrfconnect/sdk-nrf/blob/main/applications/nrf_desktop/src/modules/watchdog.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;is up-to you.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>