<?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>Clock inaccuracy of nRF52832 custom board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34423/clock-inaccuracy-of-nrf52832-custom-board</link><description>When using uart example on my curstom board, from /examples/peripheral/uart ,at baudrate 9600, bits are read with a little offset - so that starting from 4th bit, it is mistaken with the fallowing bit. When measuring with logic analyzer, lenght of each</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 Jul 2018 08:31:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34423/clock-inaccuracy-of-nrf52832-custom-board" /><item><title>RE: Clock inaccuracy of nRF52832 custom board</title><link>https://devzone.nordicsemi.com/thread/138904?ContentTypeID=1</link><pubDate>Wed, 04 Jul 2018 08:31:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5fa6cc5-a6dc-4b56-9f8e-2266f47ca36b</guid><dc:creator>barky</dc:creator><description>&lt;p&gt;Radio was not working because pins DCC and DEC4 were shorted. From typical application example i made a mistake, it looked for me that those pins were together...&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Selection_5F00_003.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock inaccuracy of nRF52832 custom board</title><link>https://devzone.nordicsemi.com/thread/134673?ContentTypeID=1</link><pubDate>Tue, 05 Jun 2018 08:09:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85acf1a6-b6dc-45fc-a410-f54d902e64f3</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi, to use the softdevice api you will first need to enable the softdevice.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock inaccuracy of nRF52832 custom board</title><link>https://devzone.nordicsemi.com/thread/134353?ContentTypeID=1</link><pubDate>Fri, 01 Jun 2018 12:00:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7048fa8c-88c0-4da6-89c4-f49460f24208</guid><dc:creator>barky</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;int main(void)
{
    /* Configure leds. */
    nrf_gpio_cfg_output(LED_3);

    //Initialize HFCLK 
	uint32_t p_is_running;
    
    (void)sd_clock_hfclk_request();
    do { 
        sd_clock_hfclk_is_running(&amp;amp;p_is_running); 
    }while(p_is_running==0);

    while (true)
    {
        nrf_delay_ms(500);
        nrf_gpio_pin_set(LED_3);
        nrf_delay_ms(500);
        nrf_gpio_pin_clear(LED_3);
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I tried this code and it stuck, when using softdevice.&lt;/p&gt;
&lt;p&gt;From infocenter: &amp;quot;parameter p_is_running results in 1 if the external crystal oscillator is running, 0 if not.&amp;quot;&lt;/p&gt;
&lt;p&gt;Moreover, return value of &amp;quot;sd_clock_hfclk_is_running&amp;quot; is 0 or &amp;quot;NRF_SUCCESS&amp;quot; if successful.&lt;/p&gt;
&lt;p&gt;I found issue, quite relevant: &lt;a title="Case ID: 117750 " href="https://devzone.nordicsemi.com/f/nordic-q-a/17751/nrf52-softdevice_handler_init-fails-to-init-when-power-is-over-2-8v"&gt;Case ID: 117750 &lt;/a&gt; ,where DC-DC power caps were cold soldered, maybe my case is similar, even though i checked all connections and values of passive components (i am useing internal LDO configuration).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock inaccuracy of nRF52832 custom board</title><link>https://devzone.nordicsemi.com/thread/134148?ContentTypeID=1</link><pubDate>Thu, 31 May 2018 09:22:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fac070f-e42e-4f3f-aa58-a9046048049d</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;If the softdevice is enabled, then you need to use:&lt;/p&gt;
&lt;p&gt;sd_clock_hfclk_request();&lt;br /&gt;while(!sd_clock_hfclk_is_running());&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;sd_clock_hfclk_release();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock inaccuracy of nRF52832 custom board</title><link>https://devzone.nordicsemi.com/thread/134092?ContentTypeID=1</link><pubDate>Wed, 30 May 2018 19:22:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80dbc776-0545-4768-aa8f-91a323e4a736</guid><dc:creator>barky</dc:creator><description>&lt;p&gt;Yea it is...&lt;/p&gt;
&lt;p&gt;I used blinky example with with s132 softdevice, added lines:&lt;/p&gt;
&lt;div style="background-color:#1e1e1e;color:#d4d4d4;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace, &amp;#39;Droid Sans Fallback&amp;#39;;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt; NRF_CLOCK-&amp;gt;&lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;EVENTS_HFCLKSTARTED&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;=&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#b5cea8;"&gt;0&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt; NRF_CLOCK-&amp;gt;&lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;TASKS_HFCLKSTART&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;=&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#b5cea8;"&gt;1&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#dcdcaa;"&gt;nrf_delay_ms&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;(&lt;/span&gt;&lt;span style="color:#b5cea8;"&gt;300&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#608b4e;"&gt;// Wait for the external oscillator to start up&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#c586c0;"&gt;while&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; (NRF_CLOCK-&amp;gt;&lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;EVENTS_HFCLKSTARTED&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;==&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#b5cea8;"&gt;0&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;) {}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;And its still stuck...&lt;/p&gt;
&lt;p&gt;I have the LF_clock also on the board, maybe configuration with it are messing with software.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock inaccuracy of nRF52832 custom board</title><link>https://devzone.nordicsemi.com/thread/134086?ContentTypeID=1</link><pubDate>Wed, 30 May 2018 16:06:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e30cc755-09b4-46df-bcac-b9c361b7597c</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Is the softdevice enabled?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock inaccuracy of nRF52832 custom board</title><link>https://devzone.nordicsemi.com/thread/134084?ContentTypeID=1</link><pubDate>Wed, 30 May 2018 15:55:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f54dd85b-a83f-4b81-9ede-58d6c77990d4</guid><dc:creator>barky</dc:creator><description>&lt;p&gt;As i mentioned earlier, the clock became accurate after placing crystal in correct position (90 degrees).&lt;/p&gt;
&lt;p&gt;For example, each bit lenght of uart message is now 104uS as supposed to, but program halts on:&lt;/p&gt;
&lt;p&gt;//while (NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0) {}&lt;/p&gt;
&lt;p&gt;loop. So crystal kinda works.&lt;/p&gt;
&lt;p&gt;As i read in other threads, maybe there is wrong capacitors placed on DEC pins...&lt;/p&gt;
&lt;p&gt;Any suggestions?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock inaccuracy of nRF52832 custom board</title><link>https://devzone.nordicsemi.com/thread/132824?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 16:36:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbc60256-2d7d-4a5e-a027-b59e5b3282f7</guid><dc:creator>dgerman</dc:creator><description>&lt;p&gt;It happens. Good that you mentioned it here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock inaccuracy of nRF52832 custom board</title><link>https://devzone.nordicsemi.com/thread/132822?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 16:15:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cee096fb-c943-4d60-9103-33e504707645</guid><dc:creator>barky</dc:creator><description>&lt;p&gt;Looks like the case can be closed. Sorry for my frivolity.&lt;/p&gt;
&lt;p&gt;Haven&amp;#39;t every made this mistake, people &lt;strong&gt;remember to look in datasheets if layout of part is not drawn from the bottom view, not the top!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Therefore XTAL X1 and X2 were connected to board GND pins.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock inaccuracy of nRF52832 custom board</title><link>https://devzone.nordicsemi.com/thread/132719?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 10:45:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1638e759-149d-4fdb-9deb-4f5e3365804d</guid><dc:creator>barky</dc:creator><description>[quote userid="2111" url="~/f/nordic-q-a/34423/clock-inaccuracy-of-nrf52832-custom-board/132703"]&lt;p&gt;No need to set the frequency, as there is only one crystal supported (32MHz).&lt;/p&gt;&lt;p&gt;Does the radio work? Are you able to transmit and receive data&lt;/p&gt;&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Radio doesn&amp;#39;t work. I tried beacon example, and it is not advertising.&lt;/p&gt;
&lt;p&gt;I have connected 32MHz crystal like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1526985069432v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The crystal is &amp;quot;LFXTAL055595&amp;quot; with 10pF load capacitance. I added 12 pF load capacitors. Maybe i fried the crystal while soldering. Will try resoldering another one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock inaccuracy of nRF52832 custom board</title><link>https://devzone.nordicsemi.com/thread/132703?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 09:43:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a10104ad-b5b5-4dea-987b-ca14844edce4</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;No need to set the frequency, as there is only one crystal supported (32MHz).&lt;/p&gt;
&lt;p&gt;Does the radio work? Are you able to transmit and receive data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock inaccuracy of nRF52832 custom board</title><link>https://devzone.nordicsemi.com/thread/132656?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 07:56:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d7adb08-1033-47de-b3d1-b561bae1a02c</guid><dc:creator>barky</dc:creator><description>&lt;p&gt;Well yes, the frequency will shift, because of the probe capacitance, but waveform should have been visible.&lt;/p&gt;
&lt;p&gt;I will continue actively debugging the clock. I added lines to code, but program halts, meaning that it is stuck in a while loop:&lt;/p&gt;
&lt;div style="background-color:#1e1e1e;color:#d4d4d4;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace, &amp;#39;Droid Sans Fallback&amp;#39;;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#608b4e;"&gt;// Start the external high frequency crystal&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt; NRF_CLOCK-&amp;gt;&lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;EVENTS_HFCLKSTARTED&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;=&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#b5cea8;"&gt;0&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt; NRF_CLOCK-&amp;gt;&lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;TASKS_HFCLKSTART&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;=&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#b5cea8;"&gt;1&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#dcdcaa;"&gt;nrf_clock_lf_actv_src_get&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#608b4e;"&gt;// Wait for the external oscillator to start up&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#c586c0;"&gt;while&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; (NRF_CLOCK-&amp;gt;&lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;EVENTS_HFCLKSTARTED&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;==&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#b5cea8;"&gt;0&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Isn&amp;#39;t it needed to set the clock frequency e.g. 32MHz or 16MHz somewhere?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock inaccuracy of nRF52832 custom board</title><link>https://devzone.nordicsemi.com/thread/132592?ContentTypeID=1</link><pubDate>Mon, 21 May 2018 14:01:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f660f4b5-8d01-4628-b580-2f41e702d023</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;You can never measure clock at a crystal with probes.&amp;nbsp; The probes will always load pull the crystal. The easiest way to measure frequency accuracy is with a calibrated spectrum analyzer with the nRF producing CW. Also you can route P_Clk out through gpio and measure that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock inaccuracy of nRF52832 custom board</title><link>https://devzone.nordicsemi.com/thread/132573?ContentTypeID=1</link><pubDate>Mon, 21 May 2018 07:21:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bec17110-25d4-4e92-9f60-25b01637f9b8</guid><dc:creator>barky</dc:creator><description>&lt;p&gt;Thanks you for the tip.&lt;/p&gt;
&lt;p&gt;Problem stays the same. I tried to measure the waveform on 32MHz crystal, but all i see on osciloscope is 100mV DC on both X1 and X2 pins.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clock inaccuracy of nRF52832 custom board</title><link>https://devzone.nordicsemi.com/thread/132349?ContentTypeID=1</link><pubDate>Wed, 16 May 2018 19:08:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:410bec40-72cc-4298-80cd-72c332749116</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;have you started the external crystal oscillator by calling NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1;?&lt;/p&gt;
&lt;p&gt;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/clock.html?cp=2_1_0_18_2#topic"&gt;http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/clock.html?cp=2_1_0_18_2#topic&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>