<?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>FreeRtos vTaskDelayUntil affect WDT Timeout</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51305/freertos-vtaskdelayuntil-affect-wdt-timeout</link><description>Hi 
 I am using the NRF52832 ,my code is based on the ble_app_hrs_freertos example sdk 15.0.0 
 I have one main task which usually run 64 time every second using the vTaskDelayUntil(&amp;amp;xLastWakeTime, 16) . 
 and when trying test the WDT(which is configured</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Sep 2019 11:36:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51305/freertos-vtaskdelayuntil-affect-wdt-timeout" /><item><title>RE: FreeRtos vTaskDelayUntil affect WDT Timeout</title><link>https://devzone.nordicsemi.com/thread/208455?ContentTypeID=1</link><pubDate>Fri, 06 Sep 2019 11:36:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3fa66bf-4a1b-44fb-937e-b63967f71d11</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Ibrahim,&lt;/p&gt;
&lt;p&gt;Sorry for the delay. Susheel is out of office, and I will handle your ticket.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have two questions:&lt;/p&gt;
&lt;p&gt;- You say that the watch dog times out after 4 seconds if you feed the watchdog in your init function. Are you sure that your application doesn&amp;#39;t reset before the 12 seconds pass? If you try to set a breakpoint on where you feed the watchdog right after you start the application, you should be able to tell if it is being called again due to a reset.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;- There are some options when you initialize the watchdog. You probably call nrf_drv_wdt_init(&amp;amp;config, wdt_event_handler) somewhere in your project.&lt;/p&gt;
&lt;p&gt;Can you please check what your&amp;nbsp;config.behaviour is?&lt;/p&gt;
&lt;p&gt;From sdk_config.h:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// &amp;lt;o&amp;gt; NRFX_WDT_CONFIG_BEHAVIOUR  - WDT behavior in CPU SLEEP or HALT mode
 
// &amp;lt;1=&amp;gt; Run in SLEEP, Pause in HALT 
// &amp;lt;8=&amp;gt; Pause in SLEEP, Run in HALT 
// &amp;lt;9=&amp;gt; Run in SLEEP and HALT 
// &amp;lt;0=&amp;gt; Pause in SLEEP and HALT 

#ifndef NRFX_WDT_CONFIG_BEHAVIOUR
#define NRFX_WDT_CONFIG_BEHAVIOUR 1
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If it is not 9, can you please try to set it to 9 before nrd_drv_wdt_init(&amp;amp;config, wdt_event_handler)? Does it still behave the same?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRtos vTaskDelayUntil affect WDT Timeout</title><link>https://devzone.nordicsemi.com/thread/208237?ContentTypeID=1</link><pubDate>Thu, 05 Sep 2019 13:56:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7fe92a8-343c-4d12-9fd2-11aee427954b</guid><dc:creator>ibrahim upright</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Any update on the issue ?&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRtos vTaskDelayUntil affect WDT Timeout</title><link>https://devzone.nordicsemi.com/thread/205764?ContentTypeID=1</link><pubDate>Fri, 23 Aug 2019 07:35:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbaebefb-c75f-4a89-9e11-60c9e927c094</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Ibrahim,&lt;/p&gt;
&lt;p&gt;I have some issues with my laptop and gave it to IT to fix it, unfortunately I would have to look into this before Monday when i get a new laptop. Sorry about the inconvenience.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRtos vTaskDelayUntil affect WDT Timeout</title><link>https://devzone.nordicsemi.com/thread/205649?ContentTypeID=1</link><pubDate>Thu, 22 Aug 2019 13:50:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd083ac8-3d32-4c63-ba18-3ec68f2ce7e2</guid><dc:creator>ibrahim upright</dc:creator><description>&lt;p&gt;Thank you&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I need the support as soon as possible so i tried to contact Thomas but he is in vacation&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How can i send you the code ?&lt;/p&gt;
&lt;p&gt;Thanks&amp;nbsp;a lot&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Ibrahim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRtos vTaskDelayUntil affect WDT Timeout</title><link>https://devzone.nordicsemi.com/thread/205634?ContentTypeID=1</link><pubDate>Thu, 22 Aug 2019 13:24:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3aa60b85-c5c3-4ce7-a84d-8f2826975904</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Softdevice does not use WDT&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRtos vTaskDelayUntil affect WDT Timeout</title><link>https://devzone.nordicsemi.com/thread/205633?ContentTypeID=1</link><pubDate>Thu, 22 Aug 2019 13:21:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:976a7190-d191-4bc4-9b9a-3754b3ed7251</guid><dc:creator>ibrahim upright</dc:creator><description>&lt;p&gt;Thank you Susheel&lt;/p&gt;
&lt;p&gt;Before i send you the project&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is it possible that the softdevice feed the dog?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks a lot&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Ibrahim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRtos vTaskDelayUntil affect WDT Timeout</title><link>https://devzone.nordicsemi.com/thread/205629?ContentTypeID=1</link><pubDate>Thu, 22 Aug 2019 13:16:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e586a77-8832-46f3-b449-30190a7e57b9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;This does not sound correct, Can you please give me a minimalistic project to replicate the issue. I will try to debug this both in software and hardware level to see if WDT is really configured for 4 second timeout but the reset you see is 12 seconds after you last fed the WDT.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRtos vTaskDelayUntil affect WDT Timeout</title><link>https://devzone.nordicsemi.com/thread/205601?ContentTypeID=1</link><pubDate>Thu, 22 Aug 2019 12:29:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40d9410c-1c32-4c04-8c21-a7d5fc978738</guid><dc:creator>ibrahim upright</dc:creator><description>&lt;p&gt;Thank you Susheel for the quick replay&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i actually have one place that feeds the WDT and it&amp;#39;s in the Init function&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I set a breakpoint on the function&amp;nbsp;nrf_wdt_reload_request_set and counted the time&amp;nbsp;from calling this function until WD reset event and i counted 12 seconds (without feeding the dog in the middle)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Without any feeding to the WDT it actually happens after 4 seconds. but that doesn&amp;#39;t explain why after 12sec&amp;nbsp;from 1 feeding we get a WDT event&lt;/p&gt;
&lt;p&gt;This is how we feed the WDT :&lt;/p&gt;
&lt;p&gt;//Reload the WDT_REGISTER value.&lt;br /&gt; nrfx_wdt_channel_feed(NRF_WDT_RR0);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks a lot&amp;nbsp;&lt;/p&gt;
&lt;p&gt;ibrahim&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRtos vTaskDelayUntil affect WDT Timeout</title><link>https://devzone.nordicsemi.com/thread/205581?ContentTypeID=1</link><pubDate>Thu, 22 Aug 2019 11:53:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:342d54c7-7ac0-4f14-95c4-1f8df92fd348</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Ibrahim,&lt;/p&gt;
[quote user=""]and when trying test the WDT(which is configured to give timeout event after 4000ms) without feeding it a WDT event happens&amp;nbsp;after more than &lt;strong&gt;12 seconds&lt;/strong&gt;!!!!.[/quote]
&lt;p&gt;There is nothing in the system that could postpone the WDT timeout event from 4 seconds to 12 seconds. Seems like some of the task in your application is feeding the watchdog.&amp;nbsp;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Can you please explain the watchdog feeding task mechanism and the task run frequency?&lt;/li&gt;
&lt;li&gt;Can you toggle a gpio&amp;nbsp;everytime it feeds the WDT so that we know that WDT is being fed.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In short, there is no possible way I can see that the WDT is not being fed and still does not timeout immediately after 4000ms. If it does, there is a serious bug in the hardware which is very unlikely.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>