<?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>Programming 3rd-Party nRF51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/36890/programming-3rd-party-nrf51822</link><description>Hello All 
 
 Since 3 days now, I am trying to program my third party beacon board PTR9048 with the PCA10028. I&amp;#39;m pretty sure, that I connected it correctly, because I can program the SoftDevice on it, and can the it in nRFgo Studio as well. I tried flashing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Aug 2018 07:49:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/36890/programming-3rd-party-nrf51822" /><item><title>RE: Programming 3rd-Party nRF51822</title><link>https://devzone.nordicsemi.com/thread/144084?ContentTypeID=1</link><pubDate>Tue, 14 Aug 2018 07:49:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fd11ea5-bbd2-4b69-9a6d-479a59eea332</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;If you take an untouched example, for instance ble_app_hrs, then do the following alterations:&lt;/p&gt;
&lt;p&gt;1. Change the IRAM1 size from 0x5800 to 0x1800&lt;/p&gt;
&lt;p&gt;2. Set the LFCLK to RC oscillator:&amp;nbsp;SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_8000MS_CALIBRATION, NULL);&lt;/p&gt;
&lt;p&gt;3. compile and load the firmware.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you still have issues?&lt;/p&gt;
&lt;p&gt;If yes; try to erase the whole chip (nrfjprog -e) and reprogram the S130 softdevice v1.0 (This is the version used in SDK v10), then load your program again.&lt;/p&gt;
&lt;p&gt;Still have issues? Enter debug mode in Keil, and see where it stops.&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: Programming 3rd-Party nRF51822</title><link>https://devzone.nordicsemi.com/thread/143450?ContentTypeID=1</link><pubDate>Wed, 08 Aug 2018 22:29:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3f70e8f-879e-44b0-b3da-2084df5adcf6</guid><dc:creator>Lu</dc:creator><description>&lt;p&gt;Okay, so I tried many things now.. The RAM size seems to not be the problem.&lt;br /&gt;I use the P09 now to get some Messages via UART out. So this is working and the code&lt;br /&gt;does not stuck somewhere.&lt;br /&gt;In my Opinion there is a problem about the clock, so here is what I did:&lt;/p&gt;
&lt;p&gt;In the SDK_config:&lt;br /&gt;#define CLOCK_CONFIG_XTAL_FREQ 255&lt;br /&gt;#define CLOCK_CONFIG_LF_SRC 0&lt;/p&gt;
&lt;p&gt;In this post (&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/4675/hfclkstat-and-an-external-crystal/16578#16578)"&gt;devzone.nordicsemi.com/.../16578&lt;/a&gt; I read about HF Clock not working so I tried whats said there:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED = 0;
NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1;
while (NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0)
{
// Wait for started event to occur. Note: will spin forever if crystal isnt working
__NOP();
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So before I call that the HFCLKSTAT is&amp;nbsp;&lt;span&gt;0x00010000, and after&amp;nbsp;0x00010001 like mentioned in the post,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;but in a Bluetooth Scan I can still not see the device...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Any suggestions anymore?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for your help!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming 3rd-Party nRF51822</title><link>https://devzone.nordicsemi.com/thread/142853?ContentTypeID=1</link><pubDate>Fri, 03 Aug 2018 13:55:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:768d5ebe-609a-4635-b356-aabc11664a8b</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;The RAM length should be 0x1800, as the softdevice uses 0x2800 (0x4000 - 0x2800 = 0x1800). I suspect you&amp;#39;re running out of RAM, which will cause a HardFault in the CPU.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming 3rd-Party nRF51822</title><link>https://devzone.nordicsemi.com/thread/142835?ContentTypeID=1</link><pubDate>Fri, 03 Aug 2018 13:00:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bde3d7d-94a1-4c65-8460-8f2689f05671</guid><dc:creator>Lu</dc:creator><description>&lt;p&gt;Yes I left the Flash the same and for RAM I changed the Lenght to 0x4000.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming 3rd-Party nRF51822</title><link>https://devzone.nordicsemi.com/thread/142737?ContentTypeID=1</link><pubDate>Fri, 03 Aug 2018 07:33:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0408d4c9-9765-4f1c-95a3-13579b2463cc</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Did you accommodate for the RAM size being smaller on your device? Your current device has 16k of RAM while examples assume it is the 32k RAM variant of the nRF51822 (QFAC)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming 3rd-Party nRF51822</title><link>https://devzone.nordicsemi.com/thread/142659?ContentTypeID=1</link><pubDate>Thu, 02 Aug 2018 14:46:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea294cca-da67-4640-b85b-55ae20c3e6ce</guid><dc:creator>Lu</dc:creator><description>&lt;p&gt;There are no errors or stucks.. But even with the XTAL-Clock it does not stuck. I guess there is something basicly wrong.&lt;/p&gt;
&lt;p&gt;Complete erase did not work either..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming 3rd-Party nRF51822</title><link>https://devzone.nordicsemi.com/thread/142520?ContentTypeID=1</link><pubDate>Thu, 02 Aug 2018 07:27:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae0bded1-b11a-4998-a6c4-2c425a65c8d6</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Where is the device stuck if you enter debug mode? It should&amp;nbsp;be able to get past the SOFTDEVICE_HANDLER_INIT(..) with that input.&lt;/p&gt;
&lt;p&gt;Try running from a &amp;quot;clean slate&amp;quot;, by issuing a &amp;quot;nrfjprog -e&amp;quot; from command line.&lt;/p&gt;
&lt;p&gt;After that, flash the softdevice (&amp;quot;nrfjprog --program &amp;lt;path/to/softdevice_s130...hex&amp;gt;&amp;quot;), then the application.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best 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: Programming 3rd-Party nRF51822</title><link>https://devzone.nordicsemi.com/thread/142469?ContentTypeID=1</link><pubDate>Wed, 01 Aug 2018 17:16:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3008030f-5e0f-45e5-a274-ad1d59a1250e</guid><dc:creator>Lu</dc:creator><description>&lt;p&gt;Im sorry, I really dont get the mistake fixed..&lt;/p&gt;
&lt;p&gt;I tried your code, it didnt compile, so I search for the definitions of the oscillators and used it like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION, NULL);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It compiles and I can flash, but it is the same as before, no errors but I cannot see the device in a bluetooth scan.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I was using the Keil, so I will show you my settings, maybe you can see the mistake directly..&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/3343.Unbenannt.PNG" /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Unbenannt1.PNG" /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Unbenann2t.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Due to the cheap china hardware, I cannot find a good Documentation, but I guess the xtal on the board is 13,56MHz. With this setting it was not working either.&lt;/p&gt;
&lt;p&gt;This ist SDK10 now, with S130 v1.0.0&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for the previous help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming 3rd-Party nRF51822</title><link>https://devzone.nordicsemi.com/thread/142324?ContentTypeID=1</link><pubDate>Wed, 01 Aug 2018 08:40:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcbf1b83-e3c2-40ac-b4ac-dcd4c0ef75b3</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;In any ble_app_* example, there shall be a ble_stack_init() function, where you can initialize the softdevice with the clock configuration.&lt;/p&gt;
&lt;p&gt;Use the below shown configuration for &amp;quot;clock_lf_cfg&amp;quot;, and it shall use the 32k RC oscillator instead of the external one.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers,&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: Programming 3rd-Party nRF51822</title><link>https://devzone.nordicsemi.com/thread/142231?ContentTypeID=1</link><pubDate>Tue, 31 Jul 2018 15:32:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:719df237-0fb8-4f32-a7fb-7340ae4e33fa</guid><dc:creator>Lu</dc:creator><description>&lt;p&gt;So just in the main.c of the Example-Project, I want to use?&lt;/p&gt;
&lt;p&gt;Thank you very much for your help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming 3rd-Party nRF51822</title><link>https://devzone.nordicsemi.com/thread/142151?ContentTypeID=1</link><pubDate>Tue, 31 Jul 2018 12:04:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94e871b6-c360-4e48-8dd6-357a1bb09d11</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Sorry, that is my fault! In newer SDKs, you can change this in a sdk_config.h file, while in older SDKs, you can explicitly set it, like the code snippet I showed in my previous reply.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming 3rd-Party nRF51822</title><link>https://devzone.nordicsemi.com/thread/141964?ContentTypeID=1</link><pubDate>Mon, 30 Jul 2018 14:18:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c090a9b3-8b78-4add-8748-32e66e5a2783</guid><dc:creator>Lu</dc:creator><description>&lt;p&gt;Sorry for the studip question, but I dont know where to put the code snipped.. Im not finding an sdk_config in my SDK folder..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming 3rd-Party nRF51822</title><link>https://devzone.nordicsemi.com/thread/141911?ContentTypeID=1</link><pubDate>Mon, 30 Jul 2018 12:25:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e10fbc0e-328d-4bd9-9910-4a70e274de12</guid><dc:creator>Lu</dc:creator><description>&lt;p&gt;Thank you very much, I will try this!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming 3rd-Party nRF51822</title><link>https://devzone.nordicsemi.com/thread/141868?ContentTypeID=1</link><pubDate>Mon, 30 Jul 2018 09:25:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31b7c164-7961-420a-9a5c-766506f9e16c</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;This module normally does not have an external 32k xtal mounted, so you&amp;#39;ll need to adjust this in your sdk_config.h (for SDK 12 and newer) to use the 32kHz internal RC oscillator instead.&lt;/p&gt;
&lt;p&gt;I assume you&amp;#39;re using SDK 12.3 or older? Then you do not have to go through the config file. Here&amp;#39;s a snippet that should be placed in ble_stack_init that will use the RC osc instead of the external xtal:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    nrf_clock_lf_cfg_t clock_lf_cfg = 
    {
        .source        = NRF_CLOCK_LF_SRC_RC,
        .rc_ctiv       = 16,                                
        .rc_temp_ctiv  = 2,                                
    };    

    // Initialize SoftDevice.
    SOFTDEVICE_HANDLER_INIT(&amp;amp;clock_lf_cfg, NULL);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Another thing you have to think about is to alter the linker script to accommodate to the RAM size of your nRF51822 device (subtract 0x4000), but it looks like you already have thought about this.&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;p&gt;&amp;nbsp;&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: Programming 3rd-Party nRF51822</title><link>https://devzone.nordicsemi.com/thread/141796?ContentTypeID=1</link><pubDate>Mon, 30 Jul 2018 01:10:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f38bd2ba-0596-4261-b014-ac8c1d1dc40f</guid><dc:creator>Lu</dc:creator><description>&lt;p&gt;Im Student, so I dont have that much knowledge.. but I am using the PCA10018 as JLink Debugger, dont I?&lt;/p&gt;
&lt;p&gt;And I guess there is no line of code that is failing, because in the linux terminal via make-command everything executes like it should.&lt;/p&gt;
&lt;p&gt;And as you can see,&amp;nbsp; I could flash the SoftDevice perfectly..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming 3rd-Party nRF51822</title><link>https://devzone.nordicsemi.com/thread/141579?ContentTypeID=1</link><pubDate>Thu, 26 Jul 2018 21:22:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07ebc618-7ba0-4634-ab52-a18b6cf91f1a</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;You need a j-link to actually see this dialog. That is all you need for actual debugging hardware. Setup the IDE of your choice and check which line of code is failing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>