<?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>How to configure peripheral to use HFXO exclusively in NRF Connect SDK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96570/how-to-configure-peripheral-to-use-hfxo-exclusively-in-nrf-connect-sdk</link><description>I am looking as using pwm and timers and trying to get them to use the HFXO rather then the internal RC as I need the higher accuracy. I know how to start it using the below code to start the clock but the issue seems to be with another peripheral turning</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Feb 2023 15:32:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96570/how-to-configure-peripheral-to-use-hfxo-exclusively-in-nrf-connect-sdk" /><item><title>RE: How to configure peripheral to use HFXO exclusively in NRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/409915?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 15:32:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df3384bc-cd1f-41b8-8b74-539a25b6f294</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>[quote user="edmcnicholas"]I have confirmed that using this the radio can not turn off my use of the clock.[/quote]
&lt;p&gt;That is good to hear.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure peripheral to use HFXO exclusively in NRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/409836?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 12:13:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abce00ad-b5eb-4455-a84d-4e24ff58b975</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;I will look into that but my client had a demo this week so I had to use what worked.&amp;nbsp; The nrfx clock api has an underlying&amp;nbsp;semaphore in the&amp;nbsp;&amp;nbsp;&lt;span&gt;nrfx_clock_start&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;NRF_CLOCK_DOMAIN_HFCLK&lt;/span&gt;&lt;span&gt;) in nrfx_clock.h call when requesting the clock so this would make me believe this is the code that makes&amp;nbsp;the clock api work. I have confirmed that using this the radio can not turn off my use of the clock.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure peripheral to use HFXO exclusively in NRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/409820?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 11:17:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d96e42a-07f2-4d01-9f47-cec01e3aff25</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Then I would strongly recommend that you switch to using the clock control API instead:&lt;/p&gt;
[quote user="hkn"]&lt;p&gt;In NCS, clock configuration is handled by the &amp;quot;clock control&amp;quot; driver, and can be&amp;nbsp;requested using this API:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/samples/peripheral/radio_test/src/main.c#L11-L41"&gt;https://github.com/nrfconnect/sdk-nrf/blob/main/samples/peripheral/radio_test/src/main.c#L11-L41&lt;/a&gt;&lt;/p&gt;[/quote]
&lt;p&gt;This is to avoid scenarios where other modules, such as the radio, leaves the HFCLK stopped afterwards.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure peripheral to use HFXO exclusively in NRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/409819?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 11:11:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:888621d9-bb45-4150-a90f-d3efe606e0fb</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;I am using ncs 2.0.&amp;nbsp; I am using the nrfx clock api&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure peripheral to use HFXO exclusively in NRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/409797?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 10:23:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40ef012d-7609-43d2-b536-b18d6f080303</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Are you using NCS or nRF5?&lt;/p&gt;
&lt;p&gt;Regardless, the HFCLK is shared with the bluetooth stack (ie. either SoftDevice in nRF5 SDK, or SoftDeviceController in NCS), so you should use the same API to ensure that you get the wanted behavior.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure peripheral to use HFXO exclusively in NRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/409628?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 14:08:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3dab75a2-3fc3-41e1-b051-222bf7d8d51f</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;I will look into this but after testing the nrfx clock code seems to work and gives me control i need at the nrfx level.&amp;nbsp; Taking a brief look at that code I do not see how you request to enable and disable the HFXO for a peripheral&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure peripheral to use HFXO exclusively in NRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/409564?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 11:50:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:758d111e-70ba-4baa-a9ea-83b4d0d97bbd</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In NCS, clock configuration is handled by the &amp;quot;clock control&amp;quot; driver, and can be&amp;nbsp;requested using this API:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/samples/peripheral/radio_test/src/main.c#L11-L41"&gt;https://github.com/nrfconnect/sdk-nrf/blob/main/samples/peripheral/radio_test/src/main.c#L11-L41&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Given that your posts here indicate nRF5 SDK, this is the correct API to use when the SoftDevice is active:&lt;/p&gt;
[quote user="edmcnicholas"]&lt;div&gt;&lt;span&gt;sd_clock_hfclk_request&lt;/span&gt;&lt;span&gt;(); &lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;while&lt;/span&gt;&lt;span&gt; (!&lt;/span&gt;&lt;span&gt;is_running&lt;/span&gt;&lt;span&gt;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;sd_clock_hfclk_is_running&lt;/span&gt;&lt;span&gt;(&amp;amp;&lt;/span&gt;&lt;span&gt;is_running&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;[/quote]
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure peripheral to use HFXO exclusively in NRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/409427?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2023 22:27:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe339c17-1446-478d-9540-5949eb0c2d81</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;After digging I think this is the right api call can someone confirm.&lt;/p&gt;
&lt;div&gt;&lt;span&gt;nrfx_clock_hfclk_start&lt;/span&gt;();&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;while&lt;/span&gt;(&lt;span&gt;nrfx_clock_hfclk_is_running&lt;/span&gt;() == &lt;span&gt;false&lt;/span&gt;);&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure peripheral to use HFXO exclusively in NRF Connect SDK</title><link>https://devzone.nordicsemi.com/thread/409421?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2023 21:00:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:898e7a88-780b-4b72-b4b3-049e0a6d7562</guid><dc:creator>edmcnicholas</dc:creator><description>&lt;p&gt;is there an nrf connect equivalent for this.&amp;nbsp; The current code looks to be missing a counting semaphore to be able to override the radio turning off the hfxo&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;sd_clock_hfclk_request&lt;/span&gt;&lt;span&gt;(); &lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;while&lt;/span&gt;&lt;span&gt; (!&lt;/span&gt;&lt;span&gt;is_running&lt;/span&gt;&lt;span&gt;) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;sd_clock_hfclk_is_running&lt;/span&gt;&lt;span&gt;(&amp;amp;&lt;/span&gt;&lt;span&gt;is_running&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>