<?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>HFXO control while using Radio</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74335/hfxo-control-while-using-radio</link><description>Hello, 
 Is that true I only need the HFXO to be on right before issuing NRF_RADIO-&amp;gt;TASKS_START = 1? 
 As long as the radio is not in TX/RX status, the HFXO can be turned off? 
 Thanks!</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 May 2021 12:20:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74335/hfxo-control-while-using-radio" /><item><title>RE: HFXO control while using Radio</title><link>https://devzone.nordicsemi.com/thread/308169?ContentTypeID=1</link><pubDate>Tue, 04 May 2021 12:20:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3859c783-52ad-42b6-9216-29169aeae31f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure why it gets stuck in that state. Is this easy to replicate on your board, and have you tried it on a nordic DK? I used your code in the SDK blinky example, but did not manage to replicate the issue on my end.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1620130439366v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;It should be sufficient to just wait for the &lt;code&gt;&lt;span&gt;EVENTS_HFCLKSTARTED &lt;/span&gt;&lt;/code&gt;event when starting the crystal and it usually shouldn&amp;#39;t be neccessary to a wait function after the clock stop task either.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HFXO control while using Radio</title><link>https://devzone.nordicsemi.com/thread/307773?ContentTypeID=1</link><pubDate>Sun, 02 May 2021 01:48:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71640911-3a48-4619-bbac-4b61293c25c6</guid><dc:creator>tc_2020</dc:creator><description>&lt;p&gt;Sorry, I read the wrong bit. So the HFCLK is running actually, but not using HFXO after issuing HFCLKSTARTED task.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HFXO control while using Radio</title><link>https://devzone.nordicsemi.com/thread/307772?ContentTypeID=1</link><pubDate>Sun, 02 May 2021 01:40:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26d6c61c-b944-482b-89c5-4acd8b7f1a33</guid><dc:creator>tc_2020</dc:creator><description>&lt;p&gt;Hi Vidar, Thanks for the figure, which is helpful!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Currently, I am having an issue that when I am turning on/off the HFXO (using &lt;strong&gt;hfxo_start&lt;/strong&gt; and &lt;strong&gt;hfxo_stop&lt;/strong&gt; function shown below) according to the usage of radio, at some point, the HFCLK stopped running, i.e. the running bit o HFCLKSTAT is 0 all times after issuing the HFCLKSTARTED task.&amp;nbsp;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;void clocks_hfxo_start(void){&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; // Start HFCLK and wait for it to start.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; if (NRF_CLOCK-&amp;gt;HFCLKSTAT != 0x00010001) {&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED = 0;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;code&gt;&lt;span&gt;while (NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED&amp;nbsp;== 0);&amp;nbsp; // blocked at here&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (NRF_CLOCK-&amp;gt;HFCLKSTAT != 0x00010001);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; }&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;void clocks_hfxo_stop(void){&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; // make sure the clock source is xtal&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; if((NRF_CLOCK-&amp;gt;HFCLKSTAT &amp;amp; 0x00000001) != 0) {&lt;/code&gt;&lt;br /&gt; &lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // make sure the clock is running&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if((NRF_CLOCK-&amp;gt;HFCLKSTAT &amp;amp; 0x00010000) != 0) {&lt;/code&gt;&lt;br /&gt; &lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NRF_CLOCK-&amp;gt;TASKS_HFCLKSTOP = 1;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while((NRF_CLOCK-&amp;gt;HFCLKSTAT &amp;amp; 0x00000001) != 0);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; }&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p style="padding-left:30px;"&gt;&lt;/p&gt;
&lt;p&gt;How should I debug this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HFXO control while using Radio</title><link>https://devzone.nordicsemi.com/thread/306517?ContentTypeID=1</link><pubDate>Fri, 23 Apr 2021 11:32:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab3c6c6c-3019-4110-ad66-dd0f7f2e6809</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Yes, that is correct, and you can turn off the crystal afterwards to lower the idle current. Just remember to take the HFXO startup time into account to be sure the the clock is ready before you start the RADIO. For comparison, our Softdevice (Bluetooth stack) ramps up the crystal about 1.5 ms prior to radio activity&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1619177309524v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>