<?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>Problem with crystal and custom board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15355/problem-with-crystal-and-custom-board</link><description>Hi, i build my own custom board with a NRF52832, i&amp;#39;m having problem with the softdevice (i think so)... my code is base on BLE s132 central and peripheral... 
 I developed the code and test on a NRF52 DK and it worked all right, everything was ok.. </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Jul 2016 08:48:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15355/problem-with-crystal-and-custom-board" /><item><title>RE: Problem with crystal and custom board</title><link>https://devzone.nordicsemi.com/thread/58680?ContentTypeID=1</link><pubDate>Wed, 27 Jul 2016 08:48:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72519087-b482-452e-9667-8bb358e916d0</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Use this config:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define NRF_CLOCK_LFCLKSRC      {.source        = NRF_CLOCK_LF_SRC_RC ,            \
                                 .rc_ctiv       = 16,                                \
                                 .rc_temp_ctiv  = 2,                                \
                                 .xtal_accuracy = 0}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Ref &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v2.0.0/structnrf__clock__lf__cfg__t.html"&gt;nrf_clock_lf_cfg_t&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;However I do not think that the problem is with the LF crystal, then the code should have stopped in &lt;code&gt;SOFTDEVICE_HANDLER_INIT(&amp;amp;clock_lf_cfg, NULL)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If the load capacitance of the crystal is 8pF, then 12 pF is the correct value for the capacitor for each leg ((12pF+4pF)/2 = 8pF, 4pF is the pin capacitance).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with crystal and custom board</title><link>https://devzone.nordicsemi.com/thread/58679?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 14:55:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abb96f18-bbc3-4332-b637-953414a163e4</guid><dc:creator>Antonio</dc:creator><description>&lt;p&gt;ok, i&amp;#39;m going to use RC oscillator can you explain me what do i have to change..&lt;/p&gt;
&lt;p&gt;LF_CLOCK_LFSOURCE... ok i found this in pca10040.h&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Low frequency clock source to be used by the SoftDevice
#define NRF_CLOCK_LFCLKSRC      {.source        = NRF_CLOCK_LF_SRC_XTAL ,            \
                                 .rc_ctiv       = 0,                                \
                                 .rc_temp_ctiv  = 0,                                \
                                 .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;i was reading, i have to change the source to NRF_CLOCK_LF_SRC_RC, and the xtal_ accuracy but i only have this accuracy defines in nrf_sdm.h:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define NRF_CLOCK_LF_XTAL_ACCURACY_250_PPM (0) /* Default */
#define NRF_CLOCK_LF_XTAL_ACCURACY_500_PPM (1)
#define NRF_CLOCK_LF_XTAL_ACCURACY_150_PPM (2)
#define NRF_CLOCK_LF_XTAL_ACCURACY_100_PPM (3)
#define NRF_CLOCK_LF_XTAL_ACCURACY_75_PPM  (4)
#define NRF_CLOCK_LF_XTAL_ACCURACY_50_PPM  (5)
#define NRF_CLOCK_LF_XTAL_ACCURACY_30_PPM  (6)
#define NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM  (7)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What else i have to do ???&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with crystal and custom board</title><link>https://devzone.nordicsemi.com/thread/58678?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 14:34:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96877055-04d9-481f-b6fc-d685f42472ac</guid><dc:creator>Locky</dc:creator><description>&lt;p&gt;Have you measure the parasitic capacitance on the PCB?   This can potentially have an effect on the loading capacitance seen by the crystal.  Generally you have to tune the loading capacitor values to hit the sweet spot of that particular crystal.  This also assume that the crystal you choose meet all the required spec&amp;#39;s of the Nordic chip.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with crystal and custom board</title><link>https://devzone.nordicsemi.com/thread/58677?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 11:45:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d38e3e7-7ad6-4a84-afd3-709fc65cb4d7</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;change the LF_CLOCK_LFSOURCE and no you don&amp;#39;t need to desolder it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with crystal and custom board</title><link>https://devzone.nordicsemi.com/thread/58676?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 11:18:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3e4fa10-5e58-4319-b6ab-a5c13d248b23</guid><dc:creator>Antonio</dc:creator><description>&lt;p&gt;ok, can you tell which lines in detail  i have to change to use RC oscillators? do i have to desoldering the crystal or i can use RC even the crystal is connected to the board?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with crystal and custom board</title><link>https://devzone.nordicsemi.com/thread/58675?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 11:09:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a512f533-abfe-4e9f-b0b1-2e449b37c68d</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;but you have a 32kHz crystal in your schematic so why did you think that was the problem? You don&amp;#39;t need one, but if you don&amp;#39;t have one you need to change the code, but you do have one so that&amp;#39;s not the problem. You could however change the LF source to calibrated RC and see if the board starts that way, which might tell you if you have a problem with the crystal that you have.&lt;/p&gt;
&lt;p&gt;You need to work out which function is returning an error code. Attach a debugger to it, you really can&amp;#39;t debug things like this with LEDs and guesswork.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with crystal and custom board</title><link>https://devzone.nordicsemi.com/thread/58674?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 11:01:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:badd5632-4b51-4243-aa1f-7ad35dde3709</guid><dc:creator>Antonio</dc:creator><description>&lt;p&gt;i said crystal because i have read that to use softdevice i need the 32.768khz crystal and maybe the problem is with the softdevice... Look the las function that the program runs is&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = sd_ble_gap_scan_start(&amp;amp;m_scan_param);
		APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;i check it with a led and the value of err_code is NRF_SUCCESS so it was success the central started to scanning but just when this instruction finish, the code restart.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with crystal and custom board</title><link>https://devzone.nordicsemi.com/thread/58673?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 10:53:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:411ccd1a-85f6-4254-a7b2-282b6680d0d8</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Why do you say &amp;#39;crystal&amp;#39; in the title? Do you suspect the crystal? Single step into that function and find out what&amp;#39;s returning an error, or put a breakpoint into the error handler and find out why you&amp;#39;re getting there and what function is returning an error code.&lt;/p&gt;
&lt;p&gt;Can you start the LF and HF crystals? You just need to connect up a JLink and write the registers and check they start. I had problems with one of my boards because I had a bad connection and the HF crystal wouldn&amp;#39;t start.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>