<?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 programming custom PCBs on nrf51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/1699/problem-programming-custom-pcbs-on-nrf51822</link><description>Hi,
I tried my best to solve my problem via forum but unfortunately no success.
I got nrf51 DK and played with it a lot. successfully program the samples and tweak them a bit. using SDK 5.1 and s110 v6. 
 The problem starts when I try custom boards</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 Jun 2014 21:16:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/1699/problem-programming-custom-pcbs-on-nrf51822" /><item><title>RE: Problem programming custom PCBs on nrf51822</title><link>https://devzone.nordicsemi.com/thread/7504?ContentTypeID=1</link><pubDate>Thu, 26 Jun 2014 21:16:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e038c70-a47a-4bb7-8f71-252c517e8ccc</guid><dc:creator>sd</dc:creator><description>&lt;p&gt;Thanks for this! Saved me at the end of e very frustrating day bringing up a new board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem programming custom PCBs on nrf51822</title><link>https://devzone.nordicsemi.com/thread/7507?ContentTypeID=1</link><pubDate>Wed, 07 May 2014 09:04:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17af0592-940b-471f-8538-d028437d971c</guid><dc:creator>sky</dc:creator><description>&lt;p&gt;Hi,all&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  if your  PCB based on the nRF51822 reference designs in the data sheet.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The SoftDevice and memory map all were set up correctly.
Test GPIO code integrated with inactive S110 SoftDevice and worked fine.&lt;/p&gt;
&lt;p&gt;Yet when running ble_app_hrs example code, main() worked up to ble_stack_init.
At that point line 231 of softdevice_handler.c ....&lt;/p&gt;
&lt;p&gt;1)please do it：
if your PCB hasn&amp;#39;t no xtal 32khz,you need to modify &amp;quot;ble_tack_init(void)&amp;quot;
BLE_STACK_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_1000MS_CALIBRATION, BLE_L2CAP_MTU_DEF, ble_evt_dispatch, false);&lt;/p&gt;
&lt;p&gt;2)the problem is still,please to do it.&lt;/p&gt;
&lt;p&gt;the xtal 16M Crystal has broken,so you need to replace by a new xtal 16M .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem programming custom PCBs on nrf51822</title><link>https://devzone.nordicsemi.com/thread/7506?ContentTypeID=1</link><pubDate>Tue, 06 May 2014 23:30:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9646ce25-7235-4b5b-9ff1-60035d31baab</guid><dc:creator>Liam Goudge</dc:creator><description>&lt;p&gt;Hi Chris&lt;/p&gt;
&lt;p&gt;Thank you very much for tracking this down. Fixed the same perplexing problem for me.&lt;/p&gt;
&lt;p&gt;I have a custom PCB based on the nRF51822 reference designs in the data sheet.
The SoftDevice and memory map all were set up correctly.
Test GPIO code integrated with inactive S110 SoftDevice and worked fine.&lt;/p&gt;
&lt;p&gt;Yet when running ble_app_hrs example code, main() worked up to ble_stack_init.
At that point line 231 of softdevice_handler.c ....&lt;/p&gt;
&lt;p&gt;err_code = sd_softdevice_enable(clock_source, softdevice_assertion_handler);&lt;/p&gt;
&lt;p&gt;... would cause a hang inside the SoftDevice in a loop between 0x237C to 0x2382.&lt;/p&gt;
&lt;p&gt;Fix was as you describe:&lt;/p&gt;
&lt;p&gt;SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM, false);&lt;/p&gt;
&lt;p&gt;I was not aware that SD110 was configured expecting an external 32KHz xtal.
Looked again and didn&amp;#39;t see reference to that in the nRF51822 data sheet, SDK or S110 documentation.&lt;/p&gt;
&lt;p&gt;Liam&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem programming custom PCBs on nrf51822</title><link>https://devzone.nordicsemi.com/thread/7505?ContentTypeID=1</link><pubDate>Tue, 08 Apr 2014 20:06:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc661922-1d9c-444b-8912-c2ea0f628504</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Ahh yeah, I read that about the power.. not sure how much worse it is. Problem getting cheap OEM boards is they cut every possible cost. I&amp;#39;m surprised that a simple RC is good for BLE.. would think it&amp;#39;d drift/be quite uncalibrated...&lt;/p&gt;
&lt;p&gt;Good info tho, thanks for that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem programming custom PCBs on nrf51822</title><link>https://devzone.nordicsemi.com/thread/7503?ContentTypeID=1</link><pubDate>Tue, 08 Apr 2014 11:54:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:119f65a3-937f-4610-a74e-c87109f8b381</guid><dc:creator>Gerry Ortoli</dc:creator><description>&lt;p&gt;Just FYI, I&amp;#39;ve been told that without having an external 32 KHz crystal, the 2 viable options for running the stack are (a) the synthesized 32 KHz source (as in, synthesized from 16 MHz) or (b) the internal 32 KHz oscillator. My understanding is that the synthesized source may be more accurate but will use more power than the internal oscillator. Nordic says the internal oscillator is sufficiently accurate for the BLE stack. If power consumption is a concern, you may wish to investigate.&lt;/p&gt;
&lt;p&gt;Also, I found (the hard way) that when using the synth source, the RTC wasn&amp;#39;t running, but with the int osc it does. YMMV.&lt;/p&gt;
&lt;p&gt;Synth: NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM
Int osc: NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION (there are other calibration interval options but allegedly this is accurate enough for the BLE stack)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem programming custom PCBs on nrf51822</title><link>https://devzone.nordicsemi.com/thread/7502?ContentTypeID=1</link><pubDate>Tue, 08 Apr 2014 05:39:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01871351-eefb-4b5d-bff8-715e616007bb</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Well, tracked it down. It was the board I was using only had the 16Mhz xtal, no 32khz, so had to make a small change for it to work. Note that I&amp;#39;m using the latest SDK (5.2) and SD (6.0) with the QFAAC0 and it is ok for this application... YMMV..&lt;/p&gt;
&lt;p&gt;Modify the function below to use the NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM instead.. This was for a Xuntong board..&lt;/p&gt;
&lt;p&gt;static void ble_stack_init(void)
{
uint32_t err_code;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Initialize the SoftDevice handler module.
SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM, false);

// Register with the SoftDevice handler module for BLE events.
err_code = softdevice_ble_evt_handler_set(ble_evt_dispatch);
APP_ERROR_CHECK(err_code);

// Register with the SoftDevice handler module for BLE events.
err_code = softdevice_sys_evt_handler_set(sys_evt_dispatch);
APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem programming custom PCBs on nrf51822</title><link>https://devzone.nordicsemi.com/thread/7501?ContentTypeID=1</link><pubDate>Mon, 07 Apr 2014 07:39:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aabbbd71-e129-4844-ab0e-3799be763938</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;I&amp;#39;m having similar trouble with QFAAC0, it basically hangs on the SOFTDEVICE_HANDLER_INIT code... same sequence of loading works fine on the DK board (newer/diff rev chip)...&lt;/p&gt;
&lt;p&gt;I&amp;#39;m running s110 v6 ..... bit annoying as I&amp;#39;ve just picked up 10 of these little boards to use and dead in the water with them at the mo.&lt;/p&gt;
&lt;p&gt;Did you have any resolution to this problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem programming custom PCBs on nrf51822</title><link>https://devzone.nordicsemi.com/thread/7500?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2014 04:46:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b12f21d3-7d8a-4fb2-90d1-16153b3b2929</guid><dc:creator>Ali Mahmoudzadeh</dc:creator><description>&lt;p&gt;Thanks for the suggestion, I did add the proper lines for internal 32 kHz .
NRF_CLOCK-&amp;gt;XTALFREQ = CLOCK_XTALFREQ_XTALFREQ_16MHz;
NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED = 0;
NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1;
while(NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0) {}		
nrf_gpio_pin_set(ALERT_PIN_NO); //use this pin to check if program halts
BLE_STACK_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_8000MS_CALIBRATION, BLE_L2CAP_MTU_DEF, ble_evt_dispatch, false);&lt;/p&gt;
&lt;p&gt;The program runs smoothly on PCA10006 when I disconnect the external 32khz oscillator but when I test the same hex file and stack on my custom board, it stops in the while loop, i.e. the HF Clock does not start. any Idea?
(The PCA10006 uses a QFAAG0 chip while mine is QFAAC0,  use s110 v5.2.1 and SDK 4.4.2 that are supposed to be compatible with both chips according to the compatibility table of RM)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem programming custom PCBs on nrf51822</title><link>https://devzone.nordicsemi.com/thread/7499?ContentTypeID=1</link><pubDate>Sun, 23 Feb 2014 22:37:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51f49126-a4b1-490a-ade2-96c6ca024d4d</guid><dc:creator>Gerry Ortoli</dc:creator><description>&lt;p&gt;OK, good.
Since blinky runs your custom board hardware is generally OK &amp;amp; this could be a Soft Device resource issue. I got bit at first because the custom board I was working with didn&amp;#39;t have a 32 KHz crystal, so no BLE (SD-dependent) stuff worked until I changed the clock designation in ble_stack_init().
Since the advertising LED isn&amp;#39;t even blinking (assuming you redefined the pin selection for your board) I&amp;#39;d guess that one of your SD stack calls is failing. You might want to modify the app_error_handler() &amp;amp; see if you can break there &amp;amp; get a stack trace.
Good luck!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem programming custom PCBs on nrf51822</title><link>https://devzone.nordicsemi.com/thread/7498?ContentTypeID=1</link><pubDate>Sun, 23 Feb 2014 09:57:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce2b030c-5341-4c78-8ea4-e0b8dc48878a</guid><dc:creator>Ali Mahmoudzadeh</dc:creator><description>&lt;p&gt;Sorry if was not clear enough, Yes. I did load the soft device.
I programmed the hex file for the soft device and the output hex file of the keil through nRFgo. This worked fine with DK breakout boards and EK board. I sucessfully loaded Blinky, Hrs and proximity examples on these boards using SDK 5.1 and s110 v6.&lt;/p&gt;
&lt;p&gt;When I try my own pcbs, I know that I should go to lower versions of SDK and soft device, I installed SDK 4.4.2 (and 4.4.1) and compiled the examples through keil. Flashed s110 v5 (and then v5.2) and the keil output through nRFgo studio, but unfortunately the BLE examples does not run on my boards while the blinky works just fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem programming custom PCBs on nrf51822</title><link>https://devzone.nordicsemi.com/thread/7497?ContentTypeID=1</link><pubDate>Sun, 23 Feb 2014 06:40:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bb84f28-7b3c-4c10-8d86-f12752693270</guid><dc:creator>Gerry Ortoli</dc:creator><description>&lt;p&gt;OK, since you didn&amp;#39;t explicitly mention it, have you loaded the Soft Device into your custom board using nRFgo Studio? You&amp;#39;ll need to do that (at least once) as a separate step for your custom device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>