<?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>Failure to loadfile binary to my PCB w/ nRF51822 using nRF51 DK Debug Out</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9334/failure-to-loadfile-binary-to-my-pcb-w-nrf51822-using-nrf51-dk-debug-out</link><description>I have built a PCB that uses the nRF51822 . I am failing to load the binary onto the chip via the nRF51 DK. I can: 
 connect to the nRF51822 on my mac using the JLinkExe. 
 execute the erase command in JLink
I have a small binary called LED_TEST.hex</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Sep 2015 10:28:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9334/failure-to-loadfile-binary-to-my-pcb-w-nrf51822-using-nrf51-dk-debug-out" /><item><title>RE: Failure to loadfile binary to my PCB w/ nRF51822 using nRF51 DK Debug Out</title><link>https://devzone.nordicsemi.com/thread/34462?ContentTypeID=1</link><pubDate>Mon, 21 Sep 2015 10:28:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbdd2e5e-b3ba-42cf-b489-2b43bfb64e5c</guid><dc:creator>i_am_trying</dc:creator><description>&lt;p&gt;endnode - thank you for the links to the posts.  They were very helpful.  Much appreciated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to loadfile binary to my PCB w/ nRF51822 using nRF51 DK Debug Out</title><link>https://devzone.nordicsemi.com/thread/34461?ContentTypeID=1</link><pubDate>Mon, 21 Sep 2015 09:51:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5997e17-f8db-4163-9484-11858060ea0e</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Well the &amp;quot;hack&amp;quot; is not mine and it rather looks to me that you must connect PIN 3 when you want to use SWD from built-in SEGGER J-Link over P20 header (SH_xxx connections). See &lt;a href="http://ram.lijun.li/misc-use-nrf51-dk-debug-out.html"&gt;this&lt;/a&gt; and &lt;a href="http://electronut.in/nrf51-dk-external-programming/#E3BO"&gt;this&lt;/a&gt;. However P19 is actually EXT_xxx pins which are probably treated differently in SEGGER FW on Atmel companion chip. So in the end you have 4 SWD interfaces (3 IN and 1 OUT) on the same board, great value for money;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to loadfile binary to my PCB w/ nRF51822 using nRF51 DK Debug Out</title><link>https://devzone.nordicsemi.com/thread/34469?ContentTypeID=1</link><pubDate>Sun, 20 Sep 2015 22:43:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b69fb864-2b8c-40c5-b99f-ec99488bf63f</guid><dc:creator>i_am_trying</dc:creator><description>&lt;p&gt;Thank you endnode.  I&amp;#39;m confused why you short P2 and P3...the nRF51 Development Kit User Guide 1.0 Figure 8 shows VIO as current measurement (along with VDD_nRF)... i.e.: the sh_ pins make sense to hook up to the external nRF51822.  but to me not the others?  Well heck, you say it works for you :-).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to loadfile binary to my PCB w/ nRF51822 using nRF51 DK Debug Out</title><link>https://devzone.nordicsemi.com/thread/34468?ContentTypeID=1</link><pubDate>Sun, 20 Sep 2015 20:22:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:328c1a22-28bc-41b8-90fd-86747c711b5b</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;I&amp;#39;m actually using only following pins from header P20 on nRF51 DK boards to flash external board/chip:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;P1 (VDD nRF) to power the target.&lt;/li&gt;
&lt;li&gt;P2 (VIO) short connection to P3 (SH_VTG).&lt;/li&gt;
&lt;li&gt;P4 (SH_SWDIO) as SWDIO line for SWD flashing/debugging interface.&lt;/li&gt;
&lt;li&gt;P5 (SH_SWDCLK) as SWDCLK line for SWD flashing/debugging interface.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;plus I use any GND from the board (e.g. PIN 6 from 2x3 header P5). It&amp;#39;s working with nrfjprog (have you tried that or you cannot because of platform you are running?) and also with SEGGER J-Flash Lite (I don&amp;#39;t have license for full J-Flash but I can at least connect and read in it so it should work as well). I&amp;#39;m wondering if also PIN reset is needed when you are using JLINK and GDB? Also nRF5x chips need special &amp;quot;recover&amp;quot; sequence when RBP (readback protection) is locked in UICR and I don&amp;#39;t know how other tools then nrfjprog handle it. But that&amp;#39;s not your problem I suppose...&lt;/p&gt;
&lt;p&gt;Good luck!
Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to loadfile binary to my PCB w/ nRF51822 using nRF51 DK Debug Out</title><link>https://devzone.nordicsemi.com/thread/34467?ContentTypeID=1</link><pubDate>Sun, 20 Sep 2015 20:11:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d9c41e0-c2a7-4aaf-a4d7-731768441b23</guid><dc:creator>i_am_trying</dc:creator><description>&lt;p&gt;Looking at &amp;quot;good&amp;quot; SWD traffic versus &amp;quot;bad&amp;quot; traffic, one thing that pops out are writes to the DebugPort return a FAULT from the external nRF51822.  If this is the reason, perhaps the nRF51 DK (host) cannot write to Flash.  Now i need to figure out how to test this by sending a write to flash within the JLINK command tool.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to loadfile binary to my PCB w/ nRF51822 using nRF51 DK Debug Out</title><link>https://devzone.nordicsemi.com/thread/34466?ContentTypeID=1</link><pubDate>Sun, 20 Sep 2015 19:26:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0c18e9a-e01c-42ae-8ddb-c4fa7c8e2af7</guid><dc:creator>i_am_trying</dc:creator><description>&lt;p&gt;Jan, thank you.  I am able to verify debug out works. I hook up Adafruit&amp;#39;s Bluefruit friend and am able to loadfile and debug. i assume  it is something i am doing wrong on my pcb design.  I want to minize...do you know what pins need to be engaged?  E.g.: VDD, but not AVDD (not using radio/softdevice), SWD, SWCLK...so 4 pins on the chip are all that are needed to flash program?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to loadfile binary to my PCB w/ nRF51822 using nRF51 DK Debug Out</title><link>https://devzone.nordicsemi.com/thread/34465?ContentTypeID=1</link><pubDate>Sun, 20 Sep 2015 19:24:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ca28958-615d-45b3-b8ca-6ea86d7b3653</guid><dc:creator>i_am_trying</dc:creator><description>&lt;p&gt;Thank you very much for your insight.  I do believe I am connecting over SWD.  Note the TCP/IP connection on the console output in Eclipse.  Also, there are records to the debug port...which doesn&amp;#39;t happen unless i connect.  the protocol analyzer i am using is Saleae logic&amp;#39;s..and i would agree with you...perhaps the parsing is incorrect.
Connecting to J-Link...
...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x00000000 (Data = 0x20000000)
Target interface speed set to 1000 kHz
Resetting target
Halting target CPU...
...Target halted (PC = 0x0000048C)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to loadfile binary to my PCB w/ nRF51822 using nRF51 DK Debug Out</title><link>https://devzone.nordicsemi.com/thread/34464?ContentTypeID=1</link><pubDate>Sun, 20 Sep 2015 19:23:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27cfd766-edd2-4e30-8e89-7b141086546f</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Are you sure that &amp;quot;debug out&amp;quot; is really active on your nRF5x DK? There must be certain PINs shorted beside plugging all 4 or 5 wires (depending if you provide 3V3/5V power from DK board or separately). I&amp;#39;m using both nRF51 and nRF52 DK boards to flash custom boards with nRF51x22 chips and it works flawlessly (using nrfjprog or SEGGER J-Flash). In my case I simply connect PINs 2 and 3 on P20 header (VIO to SH_VTG).&lt;/p&gt;
&lt;p&gt;Cheers Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failure to loadfile binary to my PCB w/ nRF51822 using nRF51 DK Debug Out</title><link>https://devzone.nordicsemi.com/thread/34463?ContentTypeID=1</link><pubDate>Sun, 20 Sep 2015 03:00:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6432079c-4c1a-4ad8-9203-07a46103c779</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;That log I think shows you&amp;#39;re really not connected to the SWD port at all. There&amp;#39;s a few bit sequences in there that are impossible, for instance the writes to the ABORT register &lt;em&gt;may not&lt;/em&gt; return WAIT or FAULT, similarly reads from the CTRL/STAT register may not return WAIT or FAULT. In general there are way too many FAULTS there. Also I believe with overrun detection turned on, the stickyoverrun flag should get set by the faults and according to that trace it&amp;#39;s not.&lt;/p&gt;
&lt;p&gt;What produces that trace? It&amp;#39;s possible whatever is doing that is entirely confused and unsequenced and is decoding rubbish. Because I&amp;#39;m surprised you can even get the debugger connected if you have that many issues. Do you get a reasonable connection response to the initial connect on the JLink?&lt;/p&gt;
&lt;p&gt;You could try dropping the SWD speed down, if you have some electrical issues on your board, it may be dropping bits at speed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>