<?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>How to erase a nrf51422 using JLink after flashing a softdevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3993/how-to-erase-a-nrf51422-using-jlink-after-flashing-a-softdevice</link><description>Hello,
we experience the situation, where we are able to flash a softdevice (s210) once. After the softdevice is flushed, subsequent attempts to flash the softdevice fail with the following error message: 
 J-Link&amp;gt;loadbin s210_main.bin, 0x00000000</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Oct 2014 07:12:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3993/how-to-erase-a-nrf51422-using-jlink-after-flashing-a-softdevice" /><item><title>RE: How to erase a nrf51422 using JLink after flashing a softdevice</title><link>https://devzone.nordicsemi.com/thread/14348?ContentTypeID=1</link><pubDate>Tue, 07 Oct 2014 07:12:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1492daef-e846-4e68-b284-cbd970c0386c</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Hmm - JLink works through the debug interface, it can basically read and write anything it wants to read and write. It is true that most of the scripts I&amp;#39;ve seen, and written, do erase the whole flash first because you may as well at that point.&lt;/p&gt;
&lt;p&gt;I never by the way use that fully-qualified name on the device, just --device nrf51822, not that I remember now where on earth I got that from and Segger&amp;#39;s list of devices has all the variants and not just the base &amp;#39;nrf51822&amp;#39;&lt;/p&gt;
&lt;p&gt;Certainly using what you have works so you may as well use what you have with the erase of the UICR. It&amp;#39;s not like you have to change the softdevice very often anyway.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to erase a nrf51422 using JLink after flashing a softdevice</title><link>https://devzone.nordicsemi.com/thread/14347?ContentTypeID=1</link><pubDate>Tue, 07 Oct 2014 06:56:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52efb3dd-dc07-4805-a313-ebcc1510a607</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;Hi RK,
yes I was setting the device type. Programming a softdevice worked exactly once. After that, the UICR was set to read protect the lower flash and this causes the errors, because JLinkExe can not verify that the bin file content was correctly written.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to erase a nrf51422 using JLink after flashing a softdevice</title><link>https://devzone.nordicsemi.com/thread/14346?ContentTypeID=1</link><pubDate>Tue, 07 Oct 2014 00:42:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0372d1d-fbb3-4d53-b69a-2a23d89c503a</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;How are you calling JLinkExe? If you don&amp;#39;t specify&lt;/p&gt;
&lt;p&gt;--device nrf51822&lt;/p&gt;
&lt;p&gt;on the JLinkExe command line, then you get errors much like that one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to erase a nrf51422 using JLink after flashing a softdevice</title><link>https://devzone.nordicsemi.com/thread/14345?ContentTypeID=1</link><pubDate>Mon, 06 Oct 2014 09:47:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff1132e1-0d58-4447-afd3-4e39235b915a</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;I&amp;#39;ve came up with the followin solution:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;halt
exec device = nRF51422_xxAA
w4 4001E504, 2
w4 4001e50C, 1
Sleep 100
r
q
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Does this looks resonable?&lt;/p&gt;
&lt;p&gt;Edit: Sorry, I&amp;#39;ve forgot to mention, that the sequence above erases the entire flash.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>