<?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>Power consumption when changing HFCLK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75954/power-consumption-when-changing-hfclk</link><description>When I changed HFCLK from &amp;quot;64 MHz internal oscillator (HFINT)&amp;quot; to &amp;quot;64 MHz crystal oscillator (HFXO)&amp;quot;, the power consumption when executing sd_app_evt_wait() became larger. I would like to reduce the power consumption to the same level as &amp;quot;64 MHz internal</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 07 Jun 2021 07:28:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75954/power-consumption-when-changing-hfclk" /><item><title>RE: Power consumption when changing HFCLK</title><link>https://devzone.nordicsemi.com/thread/313822?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2021 07:28:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67911a0c-a82b-4510-a445-ddba0561edd9</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;If you need an accurate HFCLK while the chip is running CPU, then you need to request and release the HFCLK while awake. However since the chip will wakeup frequent, and the time to startup the external HFCLK require 1.5ms, this will have a higher power consumption hit on average. My impression is that the majority of applications out there dont&amp;#39; do this (the don&amp;#39;t start the external HFCLK), is there are particular reason why you need the external HFCLK while executing code?&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power consumption when changing HFCLK</title><link>https://devzone.nordicsemi.com/thread/313556?ContentTypeID=1</link><pubDate>Fri, 04 Jun 2021 07:17:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c792f023-c005-4226-99a1-9720693bc19a</guid><dc:creator>komuro</dc:creator><description>&lt;p&gt;Thank you for your answer!&lt;br /&gt;&lt;br /&gt;I used the softdevice api you gave me, but it didn&amp;#39;t lower the power consumption.&lt;br /&gt;I implemented the following after nrf_sdh_enable_request.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    uint32_t p_is_running = 0;

    sd_clock_hfclk_request();

    do {
        sd_clock_hfclk_is_running( &amp;amp;p_is_running );
    } while( p_is_running == 0);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;Is there a problem with the above response?&lt;/span&gt;&lt;br /&gt;&lt;span style="text-decoration:underline;"&gt;If there is any other way to change the oscillator other than the above, please let me know.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Also, the following link says that the oscillator is automatically switched.&lt;br /&gt;&lt;span style="text-decoration:underline;"&gt;Does the external oscillator work without the above settings in the first place?&lt;/span&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/14342/nrf52832-external-hfxo"&gt;devzone.nordicsemi.com/.../nrf52832-external-hfxo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have one more question to add.&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;If I use the software device API to switch to using an external oscillator instead of switching directly to using an external oscillator in the registers, will I still get more current?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power consumption when changing HFCLK</title><link>https://devzone.nordicsemi.com/thread/313461?ContentTypeID=1</link><pubDate>Thu, 03 Jun 2021 14:07:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff9e5a74-7ba9-4bcb-8e8b-a2ad2eddb670</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You should not access some of the peripherals directly when softdevice is enabled, please see here:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sds_s112/SDS/s1xx/sd_resource_reqs/hw_block_interrupt_vector.html"&gt;https://infocenter.nordicsemi.com/topic/sds_s112/SDS/s1xx/sd_resource_reqs/hw_block_interrupt_vector.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Instead you should use the softdevice api, for hfclk control you can find that here:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s112.api.v7.2.0/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html#ga3e5afb495a1b0307c749cc268df94a74"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s112.api.v7.2.0/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html#ga3e5afb495a1b0307c749cc268df94a74&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you are calling&amp;nbsp;sd_app_evt_wait() this will stop the HFCLK (both internal and external), by default it will always startup using internal HFCLK after sleep. In your case you are manually starting the external HFCLK every time after sleep, this will take some time, and thereby increase average current consumption. Typically external HFCLK is only required when used by the radio due to the high accuracy, this is then handled by the softdevice automatically.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>