<?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>RTC hangs after a while, Watchdog does not reset</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70048/rtc-hangs-after-a-while-watchdog-does-not-reset</link><description>I&amp;#39;m using RTC to wakeup every 500ms, I have Watchdog enabled but after a while (about half.. or an hour...) it will not wakeup anymore and watchdog will not reset. 
 I measured the current on that hang state and it consumes about 2.90uA (this matches</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 14 Jan 2021 17:33:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70048/rtc-hangs-after-a-while-watchdog-does-not-reset" /><item><title>RE: RTC hangs after a while, Watchdog does not reset</title><link>https://devzone.nordicsemi.com/thread/289293?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 17:33:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae56cae3-3b2e-4908-a6c3-5f5aee304a67</guid><dc:creator>kammutierspule</dc:creator><description>&lt;p&gt;ok I was just wondering if there was a known (defined?) behavior of this condition&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC hangs after a while, Watchdog does not reset</title><link>https://devzone.nordicsemi.com/thread/289270?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 15:14:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85e313ed-dc77-454a-a7cf-ab333a593ede</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;I think that could be the issue, yes. But I have not verified it. Normally you should have a loop to wait for LFCLKSTARTED. i.e. &lt;span&gt;&lt;a title="nrfx_clock_lfclk_is_running" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__nrfx__clock.html?cp=7_1_6_8_0_4_1_13#gaa567e2caf2443ba2f6c3edc499337e8e"&gt;nrfx_clock_lfclk_is_running&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC hangs after a while, Watchdog does not reset</title><link>https://devzone.nordicsemi.com/thread/289206?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 12:54:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59875670-2192-451b-a957-a0a3c0bf27a1</guid><dc:creator>kammutierspule</dc:creator><description>[quote userid="2112" url="~/f/nordic-q-a/70048/rtc-hangs-after-a-while-watchdog-does-not-reset/289202#289202"]while the LFXO is starting up and automatically switch to using the LFXO once this oscillator is running. The LFCLKSTARTED event will be generated when the LFXO has been started.[/quote]
&lt;p&gt;So since I start the LFCLK to user in the RTC (to wake up) but maybe I never check for the LFCLKSTARTED? it should be running from LFRC?&lt;/p&gt;
&lt;p&gt;But so, at some moment&amp;nbsp; it will &amp;quot;automatically switch&amp;quot; to the LFXO (not present) and will never recover from that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC hangs after a while, Watchdog does not reset</title><link>https://devzone.nordicsemi.com/thread/289202?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 12:44:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd4f776a-75ca-4252-9b64-ac59711d4888</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;From WDT documentation: When started, the watchdog will automatically force the 32.768 kHz RC oscillator on as long as no other 32.768 kHz clock source is running and generating the 32.768 kHz system clock&lt;/p&gt;
&lt;p&gt;From Clock documentation: If the LFXO is selected as the clock source, the LFCLK will initially start running from the 32.768 kHz LFRC while the LFXO is starting up and automatically switch to using the LFXO once this oscillator is running. The LFCLKSTARTED event will be generated when the LFXO has been started.&lt;/p&gt;
&lt;p&gt;Unfortunately I am not sure why it crashes after 5 minutes. Do you have a reset reason or similar?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC hangs after a while, Watchdog does not reset</title><link>https://devzone.nordicsemi.com/thread/288829?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2021 08:27:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ee8e380-a09c-455b-b9ea-6e5fae8388a1</guid><dc:creator>kammutierspule</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;I believe I tested 1. and it works ok and 2. is not the case, as it is waking from RTC.&lt;/p&gt;
&lt;p&gt;I found that on my configuration&amp;nbsp;sdk defines, it was wrongly setting the&amp;nbsp;LFCLKSRC to use external XTAL and I&amp;#39;m using internal RC.&lt;/p&gt;
&lt;p&gt;But why does it work with the wrong settings on the first place?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tested the following (pseudo) code, with the wrong setting (&lt;span&gt;LFCLKSRC&amp;nbsp;configured to use XTAL but not populated) it will crash in about 5 minutes:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;int main( void )
{
	HAL_OutInit( 1 );

	nrfx_wdt_config_t config = NRFX_WDT_DEAFULT_CONFIG;

	nrfx_wdt_init( &amp;amp;config, NULL );
	nrfx_wdt_channel_alloc( &amp;amp;s_wtd_channel_id );
	nrfx_wdt_enable();

	NRF_CLOCK-&amp;gt;LFCLKSRC = 1; // XTAL, is not populated, will crash in about 5m
	//NRF_CLOCK-&amp;gt;LFCLKSRC = 0; // RC, works

	HAL_OutSet( 1, true );

	HAL_mcu_sleep(500);

	while( 1 )
	{
		HAL_OutSet( 1, false );
		HAL_mcu_sleep(25);
		HAL_OutSet( 1, true );
		nrfx_wdt_channel_feed( s_wtd_channel_id );
		HAL_mcu_sleep(15);
	}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Does this different settings explains the behaviour or could be something else?&lt;/p&gt;
&lt;p&gt;I was expecting that with the wrong setting it shouldn&amp;#39;t work anytime.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC hangs after a while, Watchdog does not reset</title><link>https://devzone.nordicsemi.com/thread/288809?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2021 07:12:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aeb39ac5-feb3-4ec9-b034-76152b4729b2</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Once set up and started, the watchdog will run until it is reset. There are two things I can think about that might cause this:&lt;/p&gt;
&lt;p&gt;1. is if you configure the Watchdog to halt while in sleep. See &lt;span&gt;&lt;a title="Temporarily pausing the watchdog" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/wdt.html?cp=4_0_0_5_35_1#concept_ml5_rzw_sr"&gt;Temporarily pausing the watchdog&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. is if you are using system off: &lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52840_Rev2/ERR/nRF52840/Rev2/latest/anomaly_840_213.html?cp=4_0_1_0_1_35"&gt;WDT: WDT configuration is cleared when entering system OFF,&lt;/a&gt; but is seems to me you are not using system off?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>