<?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>Task Watchdog is causing the device to slow down</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83587/task-watchdog-is-causing-the-device-to-slow-down</link><description>Dear All, I am trying to add the task watchdog to my application, but I am dealing with some interesting issues. The NRF SDK that I am using is the v1.6.1 I have dealt with several issues, one of them being the issue resolved here: https://github.com</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 13 Jan 2022 14:31:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83587/task-watchdog-is-causing-the-device-to-slow-down" /><item><title>RE: Task Watchdog is causing the device to slow down</title><link>https://devzone.nordicsemi.com/thread/347622?ContentTypeID=1</link><pubDate>Thu, 13 Jan 2022 14:31:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30dbd90d-204a-4d62-8cfd-67defee4f747</guid><dc:creator>Giannis Anastasopoulos</dc:creator><description>&lt;p&gt;Dear &lt;a href="https://devzone.nordicsemi.com/members/hkn"&gt;Håkon Alseth&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Your suggested change indeed solved the issue, combined with the fix that I had originally included, so now it seems that it works as expected. Thank you very much for your assistance&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Task Watchdog is causing the device to slow down</title><link>https://devzone.nordicsemi.com/thread/347567?ContentTypeID=1</link><pubDate>Thu, 13 Jan 2022 12:10:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddc10621-60e6-4dd3-badd-be1c5ee3905d</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you very much for the project. I was able to reproduce the issue, and it seems to be related to the logic in task_wdt.c. If I manually apply this commit, the print is acting as normal:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/commit/df1125a58c8a313b6518ef44054d6c25f37e15a4"&gt;https://github.com/nrfconnect/sdk-zephyr/commit/df1125a58c8a313b6518ef44054d6c25f37e15a4&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try this and see if you see the same behavior?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Task Watchdog is causing the device to slow down</title><link>https://devzone.nordicsemi.com/thread/347445?ContentTypeID=1</link><pubDate>Wed, 12 Jan 2022 16:31:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e660f02-c649-4dbe-bfb2-715b4b01e775</guid><dc:creator>Giannis Anastasopoulos</dc:creator><description>&lt;p&gt;Dear &lt;a href="https://devzone.nordicsemi.com/members/hkn"&gt;Håkon Alseth&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I have created the following project that includes all the prj.conf of my overall project, but the functionality is limited to demo the issue that I am dealing with.&lt;br /&gt;&lt;br /&gt;I have used the commands:&lt;br /&gt;&lt;br /&gt;west build -p auto -b nrf9160dk_nrf9160ns&lt;br /&gt;&lt;br /&gt;and&lt;br /&gt;&lt;br /&gt;west flash.&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/test_5F00_code.rar"&gt;devzone.nordicsemi.com/.../test_5F00_code.rar&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks again for your assistance.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Task Watchdog is causing the device to slow down</title><link>https://devzone.nordicsemi.com/thread/347417?ContentTypeID=1</link><pubDate>Wed, 12 Jan 2022 14:36:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae554dcf-c931-40d3-a522-e584b7bed9b0</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you have a minimal sample that reproduces the error that you can share with me?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Task Watchdog is causing the device to slow down</title><link>https://devzone.nordicsemi.com/thread/347392?ContentTypeID=1</link><pubDate>Wed, 12 Jan 2022 13:33:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:997aecb0-dec3-4b17-bb27-36564c00293e</guid><dc:creator>Giannis Anastasopoulos</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/hkn"&gt;Håkon Alseth&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thank you very much for assisting me.&lt;br /&gt;&lt;br /&gt;&amp;quot;UART or RTT? LOG or printk?&amp;quot;&lt;br /&gt;&lt;br /&gt;Both printk and LOG are hanging.&lt;br /&gt;&lt;br /&gt;On top of this, I have created a sample where the CONFIG_TASK_WDT_HW_FALLBACK is not enabled and I am not feeding the watchdog, so once the timer expires, instead of calling my callback the device seems to behave the same as when I had the hardware fallback enabled.&lt;br /&gt;&lt;br /&gt;Do you do LOG_MODE_MINIMAL or have a dedicated logging thread?&lt;br /&gt;&lt;br /&gt;I have CONFIG_LOG_MODE_MINIMAL set to n. Since the slow printing comes from the printk as well, then I think that the problem is affecting the main thread.&lt;br /&gt;&lt;br /&gt;I am not sure if you have enough to understand/reproduce the issue here. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Task Watchdog is causing the device to slow down</title><link>https://devzone.nordicsemi.com/thread/347383?ContentTypeID=1</link><pubDate>Wed, 12 Jan 2022 13:16:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46723dc0-49d9-4d0d-b7f2-2cb7ad7813e4</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]&lt;p&gt;I have dealt with several issues, one of them being the issue resolved here:&lt;br /&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/39523"&gt;https://github.com/zephyrproject-rtos/zephyr/issues/39523&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After applying the above fix, my device would not hard-fault&lt;/p&gt;[/quote]
&lt;p&gt;I am glad this unblocked you, atleast from a fault situation!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]The debug messages that I am using would start to be printed at a gradually slower pace until they almost stop and the device will just remain in that state.[/quote]
&lt;p&gt;Could you share a bit more information on this matter?&lt;/p&gt;
&lt;p&gt;UART or RTT? LOG or printk?&lt;/p&gt;
&lt;p&gt;Do you do LOG_MODE_MINIMAL or have a dedicated logging thread?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]I am not sure what exactly is the issue but, when I set the CONFIG_TASK_WDT_HW_FALLBACK, the device behaves normally again.[/quote]
&lt;p&gt;Given the description and behavior of enabling this configuration, it seems that there&amp;#39;s a thread hanging:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/CONFIG_TASK_WDT_HW_FALLBACK.html#std-kconfig-CONFIG_TASK_WDT_HW_FALLBACK"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/CONFIG_TASK_WDT_HW_FALLBACK.html#std-kconfig-CONFIG_TASK_WDT_HW_FALLBACK&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>