<?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 a secondary clock crystal in Zephyr for NRF52833dk?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74379/how-to-configure-a-secondary-clock-crystal-in-zephyr-for-nrf52833dk</link><description>Hi all, 
 
 
 
 
 I am trying to interface a BLE mikrobus module onto a Yocto based Linux SBC. I need to use Zephyr&amp;#39;s hci_uart example to flash it onto the module, the mikrobus BLE module is based on nrf52833dk. But it doesn&amp;#39;t have a primary 32.678KHz</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 30 Apr 2021 11:43:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74379/how-to-configure-a-secondary-clock-crystal-in-zephyr-for-nrf52833dk" /><item><title>RE: How to configure a secondary clock crystal in Zephyr for NRF52833dk?</title><link>https://devzone.nordicsemi.com/thread/307649?ContentTypeID=1</link><pubDate>Fri, 30 Apr 2021 11:43:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75083b00-766c-4dc3-80a3-a5bdb0afe34c</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Have you tried debugging, e.g. with either Ozone or SES, and see if the code is stuck somewhere?&lt;/p&gt;
&lt;p&gt;With Ozone, you can simply load the generated .elf file to debug.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/thread-aware-debugging-with-nrf-connect-sdk"&gt;https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/thread-aware-debugging-with-nrf-connect-sdk&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure a secondary clock crystal in Zephyr for NRF52833dk?</title><link>https://devzone.nordicsemi.com/thread/307606?ContentTypeID=1</link><pubDate>Fri, 30 Apr 2021 07:50:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5629934-d224-437b-bdff-bdb2cfd0bd55</guid><dc:creator>Maneesh N</dc:creator><description>&lt;p&gt;Sorry for the delayed response. Tried both, No Luck.. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure a secondary clock crystal in Zephyr for NRF52833dk?</title><link>https://devzone.nordicsemi.com/thread/307319?ContentTypeID=1</link><pubDate>Wed, 28 Apr 2021 18:12:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63dc25fb-1aa2-4ea6-a304-93cb769af22c</guid><dc:creator>Sigurd</dc:creator><description>[quote user="Maneesh N"]This overlay file should be added under samples/hello_world/boards/nrf52833dk_nrf52833.overlay right?[/quote]
&lt;p&gt;&amp;nbsp;Yes. Also, if the module&amp;nbsp;don&amp;#39;t have DC/DC components for the regulator, then set this in prj.conf:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BOARD_ENABLE_DCDC=n&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure a secondary clock crystal in Zephyr for NRF52833dk?</title><link>https://devzone.nordicsemi.com/thread/307302?ContentTypeID=1</link><pubDate>Wed, 28 Apr 2021 15:17:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0918a2c-08a0-46e9-9646-42201bfddb03</guid><dc:creator>Maneesh N</dc:creator><description>&lt;p&gt;This overlay file should be added under samples/hello_world/boards/nrf52833dk_nrf52833.overlay right?&lt;span style="text-decoration:underline;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure a secondary clock crystal in Zephyr for NRF52833dk?</title><link>https://devzone.nordicsemi.com/thread/307178?ContentTypeID=1</link><pubDate>Wed, 28 Apr 2021 09:10:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d858c90-471f-4227-9189-d72acc8a560e</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Could it be an issue with flow-control?&lt;/p&gt;
&lt;p&gt;Try this overlay to turn flow-control on:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart0 {
	hw-flow-control;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;alternatively, to turn it off, try this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart0 {
	/delete-property/ rts-pin;
	/delete-property/ cts-pin;
	/delete-property/ hw-flow-control;
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7206.nrf52833dk_5F00_nrf52833.overlay"&gt;devzone.nordicsemi.com/.../7206.nrf52833dk_5F00_nrf52833.overlay&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure a secondary clock crystal in Zephyr for NRF52833dk?</title><link>https://devzone.nordicsemi.com/thread/307088?ContentTypeID=1</link><pubDate>Tue, 27 Apr 2021 16:29:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2a4b36b-6565-4782-a923-800d66a996ee</guid><dc:creator>Maneesh N</dc:creator><description>&lt;p&gt;1. Yes, that&amp;#39;s the example I&amp;#39;m trying&lt;/p&gt;
&lt;p&gt;2. Yes!&lt;/p&gt;
&lt;p&gt;3. Command-Line, I&amp;#39;m using west.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure a secondary clock crystal in Zephyr for NRF52833dk?</title><link>https://devzone.nordicsemi.com/thread/306940?ContentTypeID=1</link><pubDate>Tue, 27 Apr 2021 08:29:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ce86afa-cc13-4a8e-b2d2-4070f2cce70e</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;1) This is the sample you used?&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/master/samples/hello_world"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/master/samples/hello_world&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2) What board did you build for ?&amp;nbsp;nrf52833dk_nrf52833 ?&lt;/p&gt;
&lt;p&gt;3) Are you using command-line/ west to build and flash, or SES ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure a secondary clock crystal in Zephyr for NRF52833dk?</title><link>https://devzone.nordicsemi.com/thread/306872?ContentTypeID=1</link><pubDate>Mon, 26 Apr 2021 16:42:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:322beb38-1ff1-407a-84e7-8a45d8807dc6</guid><dc:creator>Maneesh N</dc:creator><description>&lt;p&gt;It is a virtual COM port via UART.&lt;br /&gt;&lt;br /&gt; On the Nordic SDK, making the changes mentioned above and flashing this ble_app_uart example is working fine on the module. And &lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#ifndef  NRF_SDH_CLOCK_LF_SRC
#define NRF_SDH_CLOCK_LF_SRC 0
#endif


#ifndef  NRF_SDH_CLOCK_LF_ACCURACY
#define NRF_SDH_CLOCK_LF_ACCURACY 1
#endif
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;These 2 macro definitions give me the same meaning as you had sent me before. i.e,&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# 32kHz clock source
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;but the others I&amp;#39;m not quite sure.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure a secondary clock crystal in Zephyr for NRF52833dk?</title><link>https://devzone.nordicsemi.com/thread/306780?ContentTypeID=1</link><pubDate>Mon, 26 Apr 2021 11:49:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45756d3f-b2a3-44bc-b3a2-33d7137b9d2f</guid><dc:creator>Sigurd</dc:creator><description>[quote user="Maneesh N"]I tried it on the Hello world example to see if the module is able to print anything onto the console, nothing comes up on the console.[/quote]
&lt;p&gt;&amp;nbsp;Do you know what pins&amp;nbsp;the module uses for printing? Is there some UART-USB-bridge /&amp;nbsp;virtual COM port via UART on the module?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure a secondary clock crystal in Zephyr for NRF52833dk?</title><link>https://devzone.nordicsemi.com/thread/306594?ContentTypeID=1</link><pubDate>Fri, 23 Apr 2021 15:47:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:443819e8-e90f-4aa2-8b4d-02e23d709e70</guid><dc:creator>Maneesh N</dc:creator><description>&lt;p&gt;These are the changes that the Vendor suggested I do on the nrfSDK.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#ifndef  NRF_SDH_CLOCK_LF_SRC
#define NRF_SDH_CLOCK_LF_SRC 0
#endif

 
#ifndef   NRF_SDH_CLOCK_LF_RC_CTIV
#define  NRF_SDH_CLOCK_LF_RC_CTIV 5
#endif


#ifndef  NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 10
#endif


#ifndef  NRF_SDH_CLOCK_LF_ACCURACY
#define NRF_SDH_CLOCK_LF_ACCURACY 1
#endif

 
#ifndef  CLOCK_CONFIG_LF_SRC
#define CLOCK_CONFIG_LF_SRC 0
#endif


#ifndef  NRFX_CLOCK_CONFIG_LF_SRC
#define NRFX_CLOCK_CONFIG_LF_SRC 0
#endif

 
#ifndef  CLOCK_CONFIG_LF_SRC
#define CLOCK_CONFIG_LF_SRC 0
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Since there was no hci_uart example on nrfSDK, I had to switch to Zephyr. The vendor isn&amp;#39;t sure about the changes that need to be done on Zephyr.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure a secondary clock crystal in Zephyr for NRF52833dk?</title><link>https://devzone.nordicsemi.com/thread/306591?ContentTypeID=1</link><pubDate>Fri, 23 Apr 2021 15:37:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a663a6b-8046-45e3-b209-aba2e7f6e5e6</guid><dc:creator>Maneesh N</dc:creator><description>&lt;p&gt;I tried it on the Hello world example to see if the module is able to print anything onto the console, nothing comes up on the console. &lt;br /&gt;&lt;br /&gt;The message that I have received from the vendor of that is said &amp;quot;The module doesn&amp;#39;t have 32.678KHz crystal, You need to select the secondary crystal. I mean the Internal RC Circuit&amp;quot;. &lt;br /&gt;&lt;br /&gt;I couldn&amp;#39;t make much out of it. But that&amp;#39;s what they said.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure a secondary clock crystal in Zephyr for NRF52833dk?</title><link>https://devzone.nordicsemi.com/thread/306589?ContentTypeID=1</link><pubDate>Fri, 23 Apr 2021 15:14:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dbcd16b-e3e9-44b3-ae5c-70775e318f70</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Try setting it in prj.conf for the hci_uart sample,&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/master/samples/bluetooth/hci_uart/prj.conf"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/master/samples/bluetooth/hci_uart/prj.conf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But ideally, it should be set in the board file for the custom board, so that it&amp;#39;s applied for all samples/applications that are built.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure a secondary clock crystal in Zephyr for NRF52833dk?</title><link>https://devzone.nordicsemi.com/thread/306582?ContentTypeID=1</link><pubDate>Fri, 23 Apr 2021 14:42:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf604029-4a61-4519-ba88-44f10fc6a9c1</guid><dc:creator>Maneesh N</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;br /&gt;&lt;br /&gt;May I know on which file do I set this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure a secondary clock crystal in Zephyr for NRF52833dk?</title><link>https://devzone.nordicsemi.com/thread/306575?ContentTypeID=1</link><pubDate>Fri, 23 Apr 2021 14:20:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37c6279b-72e3-4a5e-b350-b382e035e98e</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You need to configure it to use the internal&amp;nbsp;32.768 kHz RC oscillator (LFRC).&lt;/p&gt;
&lt;p&gt;Set these configs:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# 32kHz clock source
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>