<?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>Reduce power consumption through dynamic HFXO request/release operations with softdevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110187/reduce-power-consumption-through-dynamic-hfxo-request-release-operations-with-softdevice</link><description>We have a BLE, battery powered device where we&amp;#39;d like to enter low power modes whenever possible by dynamically switching between HFXO and HFINT such that our application only enables the HFXO when performing a set of actions requiring a more accurate</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Apr 2024 20:25:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110187/reduce-power-consumption-through-dynamic-hfxo-request-release-operations-with-softdevice" /><item><title>RE: Reduce power consumption through dynamic HFXO request/release operations with softdevice</title><link>https://devzone.nordicsemi.com/thread/480297?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2024 20:25:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eeb7c64f-ddf3-45d6-a95d-7a18b9c0b0d0</guid><dc:creator>Alec Werning</dc:creator><description>&lt;p&gt;Thanks for the response, Jared. We&amp;#39;ve managed to identify the root cause of our issue. &lt;br /&gt;&lt;br /&gt;Root cause:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We are calling &lt;code&gt;nrf_drv_clock_hfclk_request/release&lt;/code&gt; from a &lt;a href="https://www.freertos.org/taskENTER_CRITICAL_taskEXIT_CRITICAL.html"&gt;FreeRTOS critical section&lt;/a&gt; &lt;code&gt;taskENTER_CRITICAL()&lt;/code&gt; in our application&lt;/li&gt;
&lt;li&gt;Our critical section blocked the underlying &lt;code&gt;sd_clock_hfclk_request/release&lt;/code&gt; calls which are designated as a &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsds_s140%2FSDS%2Fs1xx%2Fprocessor_avail_interrupt_latency%2Fexception_mgmt_sd.html"&gt;level 4 interrupt priority level&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;br /&gt;Paths forward:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Alter the critical section definition to block at lower interrupt priority levels (and therefore allow the SD API at level 4 which may not be feasible or safe)&lt;/li&gt;
&lt;li&gt;Move away from the critical section and implement thread protection via something like a binary semaphore&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reduce power consumption through dynamic HFXO request/release operations with softdevice</title><link>https://devzone.nordicsemi.com/thread/478744?ContentTypeID=1</link><pubDate>Mon, 15 Apr 2024 11:26:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49b731e8-600c-4823-b273-c2a6335b9ee1</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]&lt;strong&gt;Are there any obvious barriers to dynamically requesting and releasing the HFXO from the app level when the SoftDevice is present?&lt;/strong&gt;&lt;br /&gt;[/quote]
&lt;p&gt;As long as you go through the Softdevice API then it should be fine,&amp;nbsp;&lt;/p&gt;
[quote user=""]We recently introduced an application level method to request and release the HFXO clock (via nrfx&amp;#39;s &lt;code&gt;nrf_drv_clock_hfclk_request&lt;/code&gt; and &lt;code&gt;nrf_drv_clock_hfclk_release&lt;/code&gt;) for occasional application behavior not related to BLE that needs HFXO enabled for clock accuracy. The SoftDevice is also present and handling BLE operations with the HFXO as expected.[/quote]
&lt;p&gt;Can share this code?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>