<?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 Callback didn`t execute when the system reset</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119876/wdt-callback-didn-t-execute-when-the-system-reset</link><description>Hello, 
 I am using nRF Connect SDK v2.9.0, and nRF54l15 board. I enabled the watchdog timer and used its driver in zephyr/drivers/watchdog.h 
 It seems to work fine. The reset happens after the WDT fires. But my problem is that the WDT callback seems</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Mar 2025 09:43:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119876/wdt-callback-didn-t-execute-when-the-system-reset" /><item><title>RE: WDT Callback didn`t execute when the system reset</title><link>https://devzone.nordicsemi.com/thread/527798?ContentTypeID=1</link><pubDate>Tue, 18 Mar 2025 09:43:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1a5deb5-4b46-48e2-a398-131a20973000</guid><dc:creator>Nedaa_H_Ahmed</dc:creator><description>&lt;p&gt;I tried to store the data on the flash in the WDT callback, but unfortunately, it didn&amp;#39;t store. Is it because the WDT callback should be finished within 61us?&lt;/p&gt;
&lt;p&gt;Another question: How can I stop the WDT? I called&amp;nbsp;wdt_disable inside the WDT callback to stop it, but there was no difference. The reset occurs&amp;nbsp;immediately&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WDT Callback didn`t execute when the system reset</title><link>https://devzone.nordicsemi.com/thread/527752?ContentTypeID=1</link><pubDate>Tue, 18 Mar 2025 06:54:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d342e6f-5dc6-4f98-9b70-78060736fb84</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;It would have to be stored to NV memory (RRAM) to be retained through the reset, but you would have to stop the WD to have time to store the data to flash.&amp;nbsp; Alternatively you can consider using the task watchdog with the HW WD as fallback&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/services/task_wdt/index.html"&gt;https://docs.zephyrproject.org/latest/services/task_wdt/index.html&lt;/a&gt;. I assume you will also need to rely on the low level nrfx APIs to store the data to&amp;nbsp;RRAM to allow it to be performed from the ISR.&amp;nbsp;&lt;/p&gt;
[quote user="Nedaa_H_Ahmed"]&lt;p&gt;I have another question please, how can I make sure that the callback is called&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I added only this line in the WDT callback to indicate that the callback is executed but the LED didn`t turn on&lt;/p&gt;[/quote]
&lt;p&gt;Even if the callback is invoked, the led glitch may be too short to notice. I suggest placing a breakpoint in the callback.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WDT Callback didn`t execute when the system reset</title><link>https://devzone.nordicsemi.com/thread/527658?ContentTypeID=1</link><pubDate>Mon, 17 Mar 2025 13:55:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3fcd117-8f2a-412b-9f1d-a5103c5e5027</guid><dc:creator>Nedaa_H_Ahmed</dc:creator><description>&lt;p&gt;Is there any other solution that can achieve the requirements? I want only to preserve the value of SP, and LR when the WDT happened. Should I store them in flash, or the operation will take timer more than 61us&lt;/p&gt;
&lt;p&gt;I have another question please, how can I make sure that the callback is called&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I added only this line in the WDT callback to indicate that the callback is executed but the LED didn`t turn on&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;gpio_pin_set_dt&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;led&lt;/span&gt;&lt;span&gt;, 0&lt;/span&gt;&lt;span&gt;); //when I added this line in any other place, the LED turns on&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WDT Callback didn`t execute when the system reset</title><link>https://devzone.nordicsemi.com/thread/527655?ContentTypeID=1</link><pubDate>Mon, 17 Mar 2025 13:47:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01749384-bdcd-4344-8a91-2f4e27879ce0</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;No, the RAM is cleared.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WDT Callback didn`t execute when the system reset</title><link>https://devzone.nordicsemi.com/thread/527649?ContentTypeID=1</link><pubDate>Mon, 17 Mar 2025 13:40:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17b68b8a-f600-4d80-8e21-d0882410df01</guid><dc:creator>Nedaa_H_Ahmed</dc:creator><description>&lt;p&gt;Can I do any RAM retention settings to save these data&amp;nbsp;after WDT reset?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WDT Callback didn`t execute when the system reset</title><link>https://devzone.nordicsemi.com/thread/527644?ContentTypeID=1</link><pubDate>Mon, 17 Mar 2025 13:34:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:821c5773-7018-4f87-8952-e45d5bb85142</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;All linker sections in RAM will be cleared.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WDT Callback didn`t execute when the system reset</title><link>https://devzone.nordicsemi.com/thread/527641?ContentTypeID=1</link><pubDate>Mon, 17 Mar 2025 13:33:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b35261cf-5f38-4f49-afa6-2cbf02b8b05c</guid><dc:creator>Nedaa_H_Ahmed</dc:creator><description>&lt;p&gt;But I save the data in the noinit section. Does this section&amp;nbsp;will be reset?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WDT Callback didn`t execute when the system reset</title><link>https://devzone.nordicsemi.com/thread/527639?ContentTypeID=1</link><pubDate>Mon, 17 Mar 2025 13:24:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee0fc4cf-0108-4952-b38b-a4011b1e9070</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The RAM is reset following WD reset so I&amp;#39;m afraid you will not be able to retain this data in RAM anyway. &lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/chapters/power-and-clock/reset/doc/reset.html"&gt;From the datasheet:&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/6675.pastedimage1742217821723v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>