<?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>Can I add HFCLKSRC in nrf51.h?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6850/can-i-add-hfclksrc-in-nrf51-h</link><description>Hello, 
 I am using the custom board.
There is 32MHz external oscillator.
So, I implemented like below source code for clock control. 
 NRF_CLOCK-&amp;gt;LFCLKSRC = (CLOCK_HFCLKSTAT_SRC_Xtal &amp;lt;&amp;lt; CLOCK_HFCLKSTAT_SRC_Pos);
NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED =</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 03 May 2015 09:13:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6850/can-i-add-hfclksrc-in-nrf51-h" /><item><title>RE: Can I add HFCLKSRC in nrf51.h?</title><link>https://devzone.nordicsemi.com/thread/24139?ContentTypeID=1</link><pubDate>Sun, 03 May 2015 09:13:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:191c970e-60f4-4f93-867d-0cbbd9255fd9</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;HFCLKSRC isn&amp;#39;t a register, it&amp;#39;s just an internal designation, there is only one place to connect the HF clock source and that&amp;#39;s pins XC1 and XC2. You can use a 16 or 32MHz crystal or, according to the manual, a 16MHz external source, here&amp;#39;s the relevant piece&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The HFCLK crystal oscillators utilize amplitude regulated architecture to achieve low current consumption and fast start-up. The HFCLK crystal oscillators are also designed to work with one of the following alternative external sources:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;A 16 MHz rail-to-rail clock signal applied to the XC1 pin. The XC2 pin shall then be left unconnected.&lt;/li&gt;
&lt;li&gt;A 16 MHz low swing clock signal applied to the XC1 pin. The XC2 pin shall then be left unconnected.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So external source is specified by leaving XC2 unconnected.&lt;/p&gt;
&lt;p&gt;It says nothing there about a 32MHz external reference. The table 11 in chapter 3.6 of the nrf51822 product spec also says you have a choice of 16/32MHz crystal or 16MHz external, no option for 32MHz external is listed there.&lt;/p&gt;
&lt;p&gt;I would expect if 32MHz external was available, it would work by connecting the external source to XC1, leaving XC2 unconnected and specifying 32MHz as you have done. If that doesn&amp;#39;t work, it&amp;#39;s probably because 32MHz external clock is not an available option.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>