<?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>nRF9160 HFINT accuracy problem.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67818/nrf9160-hfint-accuracy-problem</link><description>Hello, dear sir: 
 In my opinion, HFXO means external oscillator, I need to buy a external oscillator because it is not exist in nRF9160? 
 HFINT means internal oscillator, I don&amp;#39;t need to buy a external oscillator because it is in nRF9160 already? 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 30 Oct 2020 11:51:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67818/nrf9160-hfint-accuracy-problem" /><item><title>RE: nRF9160 HFINT accuracy problem.</title><link>https://devzone.nordicsemi.com/thread/277790?ContentTypeID=1</link><pubDate>Fri, 30 Oct 2020 11:51:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff43a988-f089-40c9-9d46-c906a0f4980b</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>[quote user="bbslhb"]So can I use HFXO as crystal source for&amp;nbsp;nRF9160 &amp;quot;LTE_BLE_GATEWAY&amp;quot; 1M baud rate?[/quote]
&lt;p&gt;Yes, you can use that as a HFCLK source. By default you use the HFINT, but by issuing TASKS_HFCLKSTART, you start up the HFXO.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="bbslhb"]Or HFXO can only be used by modem?[/quote]
&lt;p&gt;It can be used by the application as well. Just start it using NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART and wait for it to start up (approx. 1 ms)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can check the HFCLKSTAT register to see which is running.&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: nRF9160 HFINT accuracy problem.</title><link>https://devzone.nordicsemi.com/thread/277751?ContentTypeID=1</link><pubDate>Fri, 30 Oct 2020 09:03:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b790dc25-9497-4bd0-8919-5566580c54f6</guid><dc:creator>bbslhb</dc:creator><description>&lt;p&gt;&lt;span&gt;&amp;ldquo;There&amp;#39;s an HFXO in the nRF9160 SIP, which is used by the modem for the radio communication etc.&amp;rdquo;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So can I use HFXO as crystal source for&amp;nbsp;nRF9160 &amp;quot;LTE_BLE_GATEWAY&amp;quot; 1M baud rate?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Or HFXO can only be used by modem?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART=1 only use HFCLK but not defined HFINT or HFXO.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Both HFINT and HFXO can be the source of HFCLK.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 HFINT accuracy problem.</title><link>https://devzone.nordicsemi.com/thread/277742?ContentTypeID=1</link><pubDate>Fri, 30 Oct 2020 08:38:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22c33e1d-81e4-456a-bd95-26ec1d43aab8</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;There&amp;#39;s an HFXO in the nRF9160 SIP, which is used by the modem for the radio communication etc.&lt;/p&gt;
&lt;p&gt;If you want to start the HFCLK, the simplest form is NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART=1;, then wait and clear the EVENTS_HFCLKSTARTED event.&lt;/p&gt;
&lt;p&gt;To use the clock subsys, you can do it similar to this:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/master/samples/bluetooth/direct_test_mode/src/dtm.c#L462-L479"&gt;https://github.com/nrfconnect/sdk-nrf/blob/master/samples/bluetooth/direct_test_mode/src/dtm.c#L462-L479&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static int clock_init(void)
{
	int err;
	const struct device *clock;

	clock = device_get_binding(&amp;quot;CLOCK&amp;quot;);
	if (!clock) {
		printk(&amp;quot;Unable to find clock device binding\n&amp;quot;);
		return -ENODEV;
	}

	err = clock_control_on(clock, CLOCK_CONTROL_NRF_SUBSYS_HF);
	if (err) {
		printk(&amp;quot;Unable to turn on the clock: %d&amp;quot;, err);
	}

	return err;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]&amp;nbsp; &amp;nbsp; So will the HFINT accuracy cause problem if I run lte_ble_gateway on nRF9160 and hci_uart on nRF52840 in nRF9160DK platform because the default HCI baud rate is 1M?[/quote]
&lt;p&gt;It can, especially for larger transmission (due to drift), as the max. tolerance is given to 5%:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf9160/pmu_oscillators.html?cp=2_0_0_4_0_3_3#unique_847745536"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf9160/pmu_oscillators.html?cp=2_0_0_4_0_3_3#unique_847745536&lt;/a&gt;&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: nRF9160 HFINT accuracy problem.</title><link>https://devzone.nordicsemi.com/thread/277733?ContentTypeID=1</link><pubDate>Fri, 30 Oct 2020 08:13:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62e0338e-52c4-4f48-a119-1a00e57e1dfa</guid><dc:creator>bbslhb</dc:creator><description>&lt;p&gt;Or is there a way to use HFXO in nRF9160 to generate accurate 1M baud rate to run LTE_BLE_GATEWAY sample code?&lt;/p&gt;
&lt;p&gt;The hardware platform is nRF9160DK and HCI_UART is run on nRF52840 of nRF9160DK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>