<?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>Enable bypass of LFCLK crystal oscillator with external clock source</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60702/enable-bypass-of-lfclk-crystal-oscillator-with-external-clock-source</link><description>Hi, 
 I&amp;#39;m using SDK 16.0.0 and softdevice s140_nrf52_7.0.1 what is the proper way to set these bits through sdk_config or softdevice API? 
 
 
 Thanks</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Apr 2020 14:24:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60702/enable-bypass-of-lfclk-crystal-oscillator-with-external-clock-source" /><item><title>RE: Enable bypass of LFCLK crystal oscillator with external clock source</title><link>https://devzone.nordicsemi.com/thread/247385?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2020 14:24:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24a2ab58-0039-49dc-8ba0-6df91a216892</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The SoftDevice can be configured to use one of two available LFCLK sources: the internal RC Oscillator, or external Crystal Oscillator. In both cases BYPASS and EXTERNAL is set to 0.&lt;/p&gt;
&lt;p&gt;There is no SoftDevice API or sdk_config.h settings for BYPASS or EXTERNAL. But, there is a workaround for this, and that is by starting the LFCLK before you enable the SoftDevice.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_CLOCK-&amp;gt;LFCLKSRC = my_settings;

NRF_CLOCK-&amp;gt;TASKS_LFCLKSTART = 1;
while(NRF_CLOCK-&amp;gt;EVENTS_LFCLKSTARTED == 0);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can keep the softdevice configuration as-is (ie: SRC_XTAL and so-forth).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you hang in the while-loop when debugging, it might point to issues with the external oscillator connection.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>