<?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>Error Trying to program nRF51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16066/error-trying-to-program-nrf51822</link><description>Hello, 
 I have been looking to program this IC, connecting via SWD with no luck. I can connect to the target but for some reason once i try to perform erase programming or read i got an error message with the RAM. 
 Connecting ...
 - Connecting via</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 14 Jun 2018 14:20:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16066/error-trying-to-program-nrf51822" /><item><title>RE: Error Trying to program nRF51822</title><link>https://devzone.nordicsemi.com/thread/136203?ContentTypeID=1</link><pubDate>Thu, 14 Jun 2018 14:20:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70a7c2f5-561f-4824-9c42-33d9d826069e</guid><dc:creator>Jorge Munoz</dc:creator><description>&lt;p&gt;&lt;span&gt;Use nrfjprog &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error Trying to program nRF51822</title><link>https://devzone.nordicsemi.com/thread/61261?ContentTypeID=1</link><pubDate>Mon, 19 Sep 2016 15:12:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f941186e-d8f1-4fd7-b1aa-9bb6c098754e</guid><dc:creator>Jorge Munoz</dc:creator><description>&lt;p&gt;It was an IC issue after that, using the nrfjprog i was able to reprogram the device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error Trying to program nRF51822</title><link>https://devzone.nordicsemi.com/thread/61266?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2016 23:41:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d1a4bf7-3885-466f-a569-c6824735e1f9</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;jlink -device nRF51822_XXAA  -if SWD -speed auto&lt;/p&gt;
&lt;p&gt;works for me with version 5.12g&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error Trying to program nRF51822</title><link>https://devzone.nordicsemi.com/thread/61265?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2016 12:36:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92646826-ddc3-46b3-a894-6f2e6d62f7d2</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@jorgemunozags : Have you been able to solve this issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error Trying to program nRF51822</title><link>https://devzone.nordicsemi.com/thread/61264?ContentTypeID=1</link><pubDate>Thu, 01 Sep 2016 21:46:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a5bf0a5-5032-4f2f-af9f-14d2a849848b</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;Try using the GUI version not the command line and make sure you select the correct template&lt;/p&gt;
&lt;p&gt;Try using the older version of JLink (5.02g) it seems to work&lt;/p&gt;
&lt;p&gt;Strangely, I can&amp;#39;t connect if I manually type commands but if I make a script file just containing&lt;/p&gt;
&lt;p&gt;loadbin
r
q&lt;/p&gt;
&lt;p&gt;and start jlink like this&lt;/p&gt;
&lt;p&gt;jlink -device nRF51822_XXAA  -CommanderScript cmdfile.jlink&lt;/p&gt;
&lt;p&gt;it works fine
I have  windows bat file that creates the bat file, so I can do drag and drop upload of files, I also use the Arduino IDE sometimes to program the nRF51822 and it uploads via a bat file as well&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error Trying to program nRF51822</title><link>https://devzone.nordicsemi.com/thread/61263?ContentTypeID=1</link><pubDate>Thu, 01 Sep 2016 16:19:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d441d59f-644c-48b7-a0b9-3f13b5d927a7</guid><dc:creator>Jorge Munoz</dc:creator><description>&lt;p&gt;I tried this but the reply back is still the same:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;C:\Program Files (x86)\SEGGER\JLink_V512g&amp;gt;jlink.exe
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;SEGGER J-Link Commander V5.12g (Compiled May 27 2016 16:58:24)
DLL version V5.12g, compiled May 27 2016 16:57:47&lt;/p&gt;
&lt;p&gt;Connecting to J-Link via USB...O.K.
Firmware: J-Link / Flasher Portable V1 compiled May 11 2016 15:08:53
Hardware version: V1.10
S/N: 651100800
License(s): JFlash, GDB
VTref = 3.325V&lt;/p&gt;
&lt;p&gt;Type &amp;quot;connect&amp;quot; to establish a target connection, &amp;#39;?&amp;#39; for help
J-Link&amp;gt;connect
Please specify device / core. : NRF51822_XXAA
Type &amp;#39;?&amp;#39; for selection dialog
Device&amp;gt;
Please specify target interface:
J) JTAG (Default)
S) SWD
TIF&amp;gt;s
Specify target interface speed [kHz]. : 4000 kHz
Speed&amp;gt;2000
Device &amp;quot;NRF51822_XXAA&amp;quot; selected.&lt;/p&gt;
&lt;p&gt;Found SWD-DP with ID 0x0BB11477
Found Cortex-M0 r0p0, Little endian.
FPUnit: 4 code (BP) slots and 0 literal slots
CoreSight components:
ROMTbl 0 @ F0000000
ROMTbl 0 [0]: F00FF000, CID: B105100D, PID: 000BB471 ROM Table
ROMTbl 1 @ E00FF000
ROMTbl 1 [0]: FFF0F000, CID: B105E00D, PID: 000BB008 SCS
ROMTbl 1 [1]: FFF02000, CID: B105E00D, PID: 000BB00A DWT
ROMTbl 1 [2]: FFF03000, CID: B105E00D, PID: 000BB00B FPB
ROMTbl 0 [1]: 00002000, CID: B105900D, PID: 000BB9A3 ???
Cortex-M0 identified.
J-Link&amp;gt;w4 4001e504 2
Writing 00000002 -&amp;gt; 4001E504
J-Link&amp;gt;w4 4001e50c 1
Writing 00000001 -&amp;gt; 4001E50C
J-Link&amp;gt;w4 4001e514 1
Writing 00000001 -&amp;gt; 4001E514
J-Link&amp;gt;erase
Erasing device (nRF51822_xxAA)...&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;WARNING: CPU could not be halted&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;****** Error: Can not read register 16 (XPSR) while CPU is running
Can not read register 20 (CFBP) while CPU is running
Can not read register 0 (R0) while CPU is running
Can not read register 1 (R1) while CPU is running
Can not read register 2 (R2) while CPU is running
Can not read register 3 (R3) while CPU is running
Can not read register 4 (R4) while CPU is running
Can not read register 5 (R5) while CPU is running
Can not read register 6 (R6) while CPU is running
Can not read register 7 (R7) while CPU is running
Can not read register 8 (R8) while CPU is running
Can not read register 9 (R9) while CPU is running
Can not read register 10 (R10) while CPU is running
Can not read register 11 (R11) while CPU is running
Can not read register 12 (R12) while CPU is running
Can not read register 14 (R14) while CPU is running
Can not read register 15 (R15) while CPU is running
Can not read register 17 (MSP) while CPU is running
Can not read register 18 (PSP) while CPU is running&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;WARNING: CPU could not be halted&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;****** Error: Failed to download RAMCode!
ERROR: Erase returned with error code -1.
J-Link&amp;gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error Trying to program nRF51822</title><link>https://devzone.nordicsemi.com/thread/61262?ContentTypeID=1</link><pubDate>Thu, 01 Sep 2016 10:52:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a408b1e-772e-479a-9552-99a75a881e9e</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;I think JFlash gives this error if the device is read protected.&lt;/p&gt;
&lt;p&gt;Try connecting then issuing these commands&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;w4 4001e504 2
w4 4001e50c 1
w4 4001e514 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It should remove read protection and also erase the device (though you many want to erase again just to be sure after issuing those commands&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error Trying to program nRF51822</title><link>https://devzone.nordicsemi.com/thread/61260?ContentTypeID=1</link><pubDate>Tue, 30 Aug 2016 08:51:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdb095b8-c389-4935-97bb-46b6d60b2a69</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Have you tried using nrfjprog to erase the device?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error Trying to program nRF51822</title><link>https://devzone.nordicsemi.com/thread/61259?ContentTypeID=1</link><pubDate>Mon, 29 Aug 2016 15:36:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71826b37-aab9-4032-9adf-58283162554e</guid><dc:creator>Jorge Munoz</dc:creator><description>&lt;p&gt;Using JFlasher Portable with tektronix PS. Using JFlash 5.12, also already tried with JFlash Lite. I have been able to program like 5 different types of ARMs using the same programmer so i don&amp;#39;t think is related with the programmer itself.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error Trying to program nRF51822</title><link>https://devzone.nordicsemi.com/thread/61258?ContentTypeID=1</link><pubDate>Mon, 29 Aug 2016 15:29:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17e61a4a-2176-40f6-91ba-05785b4f8cb3</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;The same issue has already been reported &lt;a href="https://devzone.nordicsemi.com/question/7605/j-flash-flasher-arm/"&gt;on this post&lt;/a&gt;. Do you use a custom hardware ? Which programmer and which version of the Segger tools do you use ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>