<?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>nrf52480 dongle bricked after recover in OpenOCD</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87495/nrf52480-dongle-bricked-after-recover-in-openocd</link><description>Dear all, 
 
 I am facing similar issue. found in this thread: 
 devzone.nordicsemi.com/.../364579 
 I used openOCD running on Raspberry Pi to debug nrf52480 dongle with Eclipse and but I experience some problems not being able to run my code on the dongle</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 May 2022 19:26:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87495/nrf52480-dongle-bricked-after-recover-in-openocd" /><item><title>RE: nrf52480 dongle bricked after recover in OpenOCD</title><link>https://devzone.nordicsemi.com/thread/365846?ContentTypeID=1</link><pubDate>Mon, 02 May 2022 19:26:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbe08a8c-4ad2-4080-aa77-0af59c860d7d</guid><dc:creator>Ivo H</dc:creator><description>&lt;p&gt;Hello, &lt;/p&gt;
&lt;p&gt;I managed to do it!&lt;/p&gt;
&lt;p&gt;This managed to unlock the device (make sure you have set up OpenOCD on Raspberry properly to be able to communicate via SWD):&lt;/p&gt;
&lt;p&gt;sudo openocd -f rpi_as_debugger.cfg -c &amp;quot;transport select swd&amp;quot; -f target/nrf52.cfg -c &amp;quot;init;nrf52_recover&amp;quot;&lt;/p&gt;
&lt;p&gt;or this:&lt;/p&gt;
&lt;pre class="notranslate"&gt;&lt;code class="notranslate"&gt;sudo openocd -f rpi_as_debugger.cfg -c &amp;quot;transport select swd&amp;quot; -f target/nrf52.cfg -c &amp;quot;init; nrf52.dap apreg 1 0x0c; nrf52.dap apreg 1 0x04 0x01; reset; nrf5 mass_erase; reset; shutdown;&amp;quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now I do not know which one is the right one, probably the first one. I guess both do quite simmilar job, but one of them was not working properly.&lt;/p&gt;
&lt;p&gt;But still I could not see the red LED flashing.&lt;/p&gt;
&lt;p&gt;Entering this command fixed it all:&lt;/p&gt;
&lt;p&gt;sudo openocd -c &amp;#39;bindto 0.0.0.0&amp;#39; -f rpi_as_debugger.cfg -c &amp;#39;transport select swd&amp;#39; -c &amp;#39;adapter speed 100&amp;#39; -f target/nrf52.cfg -c &amp;#39;init&amp;#39; -c &amp;#39;halt&amp;#39; -c &amp;#39;nrf5 mass_erase&amp;#39; -c &amp;#39;program a.hex verify&amp;#39; -c &amp;#39;reset&amp;#39;&lt;/p&gt;
&lt;p&gt;a.hex is this file (the official Nordic firmware for pca10059): &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1373.pca10059_5F00_bootloader.zip"&gt;/cfs-file/__key/communityserver-discussions-components-files/4/1373.pca10059_5F00_bootloader.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Then unplugged the dongle, plugged in and restarted OpenOCD and works like a charm back again!&lt;/p&gt;
&lt;p&gt;Please could anyone verify this way as a correct way?&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52480 dongle bricked after recover in OpenOCD</title><link>https://devzone.nordicsemi.com/thread/365842?ContentTypeID=1</link><pubDate>Mon, 02 May 2022 18:12:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f70a7a8-b98b-422b-84db-58acfe420cf6</guid><dc:creator>Ivo H</dc:creator><description>&lt;p&gt;Actually, the error when running openOCD is this:&lt;/p&gt;
&lt;p&gt;Info : SWD DPIDR 0x2ba01477&lt;br /&gt;Error: [nrf52.cpu] Could not find MEM-AP to control the core&lt;br /&gt;****** WARNING ******&lt;br /&gt;nRF52 device has AP lock engaged (see UICR APPROTECT register).&lt;br /&gt;Debug access is denied.&lt;br /&gt;Use &amp;#39;nrf52_recover&amp;#39; to erase and unlock the device.&lt;/p&gt;
&lt;p&gt;Warn : target nrf52.cpu examination failed&lt;br /&gt;Info : starting gdb server for nrf52.cpu on 3333&lt;br /&gt;Info : Listening on port 3333 for gdb connections&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I triend to unlock the device via command:&lt;/p&gt;
&lt;p&gt;openocd -f rpi_as_debugger.cfg -c &amp;quot;transport select swd&amp;quot; -c &amp;quot;adapter speed 100&amp;quot; -c &amp;quot;init nrf52.dap apreg 1 0x0C reset&amp;quot;&lt;/p&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;p&gt;openocd -f rpi_as_debugger.cfg -c &amp;quot;transport select swd&amp;quot; -c &amp;quot;adapter speed 100&amp;quot; -c &amp;quot;init nrf52.dap apreg 1 0x04 0x01 reset&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;but no success&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>