<?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</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40099/rtc</link><description>Dear experts, please tell me, how can I switch the frequency source for the RTS from STAL to internal RC generator when the processor is running? command sequence does not work: NRF_CLOCK-&amp;gt;LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal &amp;lt;&amp;lt; CLOCK_LFCLKSRC_SRC_Pos</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 Nov 2018 18:13:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40099/rtc" /><item><title>RE: rtc</title><link>https://devzone.nordicsemi.com/thread/156030?ContentTypeID=1</link><pubDate>Mon, 05 Nov 2018 18:13:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5d1fb4d-6f9f-44da-ae24-f971a76697f6</guid><dc:creator>r_nin</dc:creator><description>&lt;p&gt;Yes, it works. I forgot to&amp;nbsp;disable the interrupt of the RTC after it triggers in order to wait for the WDT. Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: rtc</title><link>https://devzone.nordicsemi.com/thread/155981?ContentTypeID=1</link><pubDate>Mon, 05 Nov 2018 14:08:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ce58bf5-d7db-4008-a3b0-b5f177056086</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;So, when you tried this, what happened? Did it compile? Did it run? Did it work? Are you sure that it is the WDT that isn&amp;#39;t set up incorrectly?&lt;/p&gt;
&lt;p&gt;Why do you need to use the LFXTAL at first, and then switch?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: rtc</title><link>https://devzone.nordicsemi.com/thread/155650?ContentTypeID=1</link><pubDate>Thu, 01 Nov 2018 18:39:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b256567b-9bdc-4c9f-92c5-881fd78e73b8</guid><dc:creator>r_nin</dc:creator><description>&lt;p&gt;Thank you, but this is the first thing I tried. I initialize RTС2 from an external source. Then, in the RTС2 interrupt, I turn off the external source and change the source to the PC. Then I turn on WDT from it ... and nothing happens - WDT does not work! What else should i try?&lt;/p&gt;
&lt;p&gt;I want to start at the beginning of the program RTС2 from an external source. After the interrupt of RTC2, switch to the internal source of the RC and run the WDT for 10 seconds. Then after restarting the program, start the RTC2 again and so on ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: rtc</title><link>https://devzone.nordicsemi.com/thread/155646?ContentTypeID=1</link><pubDate>Thu, 01 Nov 2018 18:15:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55e96806-49a0-4368-910e-cc3bb1762d13</guid><dc:creator>superpak</dc:creator><description>&lt;p&gt;You need to stop the LFCLK, set the source and then start it up again.&lt;/p&gt;
&lt;p&gt;The LFCLK clock is stopped by triggering the LFCLKSTOP task.&lt;/p&gt;
&lt;p&gt;It is not allowed to write to register LFCLKSRC when the LFCLK is running.&lt;/p&gt;
&lt;p&gt;A LFCLKSTOP task will stop the LFCLK oscillator. However, the LFCLKSTOP task can only be triggered after the STATE field in register LFCLKSTAT indicates a &amp;#39;LFCLK running&amp;#39; state.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Before setting your clock source, you need to do this:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;NRF_CLOCK-&amp;gt;TASKS_LFCLKSTOP = 1; //stop the clock
NRF_CLOCK-&amp;gt;LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal &amp;lt;&amp;lt; CLOCK_LFCLKSRC_SRC_Pos) ; //set your source

NRF_CLOCK-&amp;gt;TASKS_LFCLKSTART&amp;#160;= 1; //start the clock again&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: rtc</title><link>https://devzone.nordicsemi.com/thread/155643?ContentTypeID=1</link><pubDate>Thu, 01 Nov 2018 18:07:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:766c08ef-7627-4841-a056-1470232d9cab</guid><dc:creator>r_nin</dc:creator><description>&lt;p&gt;XTAL-&amp;gt;RC&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>