<?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>HFCLKSTATE do not update to 0x10001</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14526/hfclkstate-do-not-update-to-0x10001</link><description>Hi,
Everyone, 
 I am Using S130 and sdk 11.0.0.2-alpha with nRF51422 chip.
I have two crystal in my custom pcb,
one is 32 Khz crystal for LFCLK between XL1 and XL2 (pin 45,46 )
and other is 16Mhz HFCLK between XC1 and XC2(pin 37, 38) 
 Inside
ble_stack_init</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 22 Jun 2016 16:22:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14526/hfclkstate-do-not-update-to-0x10001" /><item><title>RE: HFCLKSTATE do not update to 0x10001</title><link>https://devzone.nordicsemi.com/thread/55486?ContentTypeID=1</link><pubDate>Wed, 22 Jun 2016 16:22:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aec75eb8-a3c1-436b-9582-dcbf607b80e7</guid><dc:creator>nirmal@nordic</dc:creator><description>&lt;p&gt;I guess answer from stefan above explains the reason in better manner !!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HFCLKSTATE do not update to 0x10001</title><link>https://devzone.nordicsemi.com/thread/55485?ContentTypeID=1</link><pubDate>Tue, 21 Jun 2016 23:59:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3f4856a-517f-4162-b7b9-e3b5aa9b3a2b</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;This is exactly the same question you asked yesterday and I answered yesterday, don&amp;#39;t repost questions ad nauseum just because you don&amp;#39;t understand the first answer.&lt;/p&gt;
&lt;p&gt;And I told you the same thing, when you change the LF clock source there&amp;#39;s no point looking at the HF clock source register, look at the LF clock source register.&lt;/p&gt;
&lt;p&gt;The HF clock source, as I also told you yesterday, is started and stopped as necessary by the softdevice when it needs to use the radio or do other things it needs the crystal source for, like for instance, calibrate the LF clock source.&lt;/p&gt;
&lt;p&gt;So HFCLOCK &lt;em&gt;does not&lt;/em&gt; stay using the RC source, it will be turned on and off as required, and the state it&amp;#39;s in just after you change the LF clock source is completely irrelevant.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HFCLKSTATE do not update to 0x10001</title><link>https://devzone.nordicsemi.com/thread/55484?ContentTypeID=1</link><pubDate>Tue, 21 Jun 2016 16:58:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57dc5fc2-0b41-412d-96fb-a6fe28def1ca</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The selection of the 16MHz clock source should be reflected in the HFCLKSTAT register, while the selection of 32kHz clock source should be reflected in the LFCLKSTAT register. When you enable the 32kHz crystal, that should not have any effect on the HFCLKSTAT register, but should set the first bit in the LFCLKSTAT register instead.&lt;/p&gt;
&lt;p&gt;I see this happen correctly on my nRF51422 IC. What might be happening is that you set a breakpoint immediately after setting the XTAL to see the register value. It may take some time for the CLOCK module to set crystal as the clock source. In my case if I stop at the breakpoint and then step once, the LFCLKSTAT will update to have XTAL selected.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/LFCLKSTAT-with-XTAL.JPG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/LFCLKSTAT-with-RC.JPG" alt="image description" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>