<?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>When does the SoftDevice enable the external 32MHz crystal oscillator?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115946/when-does-the-softdevice-enable-the-external-32mhz-crystal-oscillator</link><description>I&amp;#39;m doing some electrical investigation on my design, and I&amp;#39;m wondering when the SoftDevice turns on/off the external 32MHz crystal oscillator. Our application is a Bluetooth device based on the nRF52832, using nRF5 SDK v17.1.0 and s132 v7.3.0. 
 I&amp;#39;ve</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 30 Oct 2024 08:49:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115946/when-does-the-softdevice-enable-the-external-32mhz-crystal-oscillator" /><item><title>RE: When does the SoftDevice enable the external 32MHz crystal oscillator?</title><link>https://devzone.nordicsemi.com/thread/508464?ContentTypeID=1</link><pubDate>Wed, 30 Oct 2024 08:49:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba8b67c5-8166-49a6-8235-e7d7dae05b08</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Yes, HFINT is the default clock source and is used most of the time.&amp;nbsp;Unless the application specifically requests the crystal oscillator (HFXO), the&amp;nbsp;Softdevice&amp;nbsp;will start and stop the crystal oscillator&amp;nbsp;for each protocol event&amp;nbsp;since keeping the crystal oscillator running significantly increases idle current (from 2-3uA to ~200uA).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For example, this is what a typical advertisment event look like (&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/power/w/opp/2/online-power-profiler-for-bluetooth-le"&gt;Online Power Profiler for Bluetooth LE&lt;/a&gt;&amp;nbsp;)&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1730276715930v5.png" alt=" " /&gt;&lt;/p&gt;
[quote user=""]I&amp;#39;ve tried printing the state of the&amp;nbsp;oscillator using&amp;nbsp;sd_clock_hfclk_is_running(). I&amp;nbsp;was expecting&amp;nbsp;to see the oscillator disabled while Advertising is disabled, and then enabled when Advertising is enabled, however, the function outputs &amp;quot;0&amp;quot; before &lt;em&gt;and&lt;/em&gt; after.[/quote]
&lt;p&gt;The crystal oscillator will only be enabled during the advertisment events.&lt;/p&gt;
[quote user=""]Is it correct to say that if advertising is&amp;nbsp;&lt;em&gt;dis&lt;/em&gt;abled and there&amp;#39;s no active connection, the external oscillator is&amp;nbsp;&lt;em&gt;not running&lt;/em&gt;?[/quote]
&lt;p&gt;The HFXO is also used&amp;nbsp;for periodic calibration&amp;nbsp;when the LFRC oscillator is selected as the 32KHz clock source. But it will only be kept on during the calibration event.&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></channel></rss>