<?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>Reflash nRF52832 through SWD</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53852/reflash-nrf52832-through-swd</link><description>Hi all, 
 I need to be able to reprogram an nRF52832 on a daughterboard from a mainboard with a Cortex M7. I have been able to eraseall and reprogram the nRF52, but it seems that about 50% of the time either the write or read-back I do to verify fails</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 01 Nov 2019 16:34:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53852/reflash-nrf52832-through-swd" /><item><title>RE: Reflash nRF52832 through SWD</title><link>https://devzone.nordicsemi.com/thread/218011?ContentTypeID=1</link><pubDate>Fri, 01 Nov 2019 16:34:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f252d948-40b9-43f3-a511-5107e3987034</guid><dc:creator>NicholasC</dc:creator><description>&lt;p&gt;Seems that the nRF52 wasn&amp;#39;t halting some of the time and that was causing my writes to fail. I fixed the issue by&amp;nbsp;replacing 7) with these steps:&lt;/p&gt;
&lt;p&gt;1) Write&amp;nbsp;0x00000001 to DEMCR ARM register.&lt;/p&gt;
&lt;p&gt;2) Write&amp;nbsp;0x05fa0004 to&amp;nbsp;AIRCR ARM register.&lt;/p&gt;
&lt;p&gt;3) Poll DHCSR register until we read&amp;nbsp;0x20000&amp;nbsp;the S_HALT bit high.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For anyone also having trouble, this basically sets the target up to halt on reset and then resets it then you confirm by seeing S_HALT high.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reflash nRF52832 through SWD</title><link>https://devzone.nordicsemi.com/thread/217841?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2019 19:20:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c07f64c-c5c9-4dcd-a233-ef2395118801</guid><dc:creator>NicholasC</dc:creator><description>&lt;p&gt;Update:&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve checked the DP.CTRL/STAT register after I finish trying to flash the chip. The value is the same regardless of if the flash writing was successful or not. There are no sticky error flags high and the RDOK flag is high.&lt;/p&gt;
&lt;p&gt;I have also checked the watchdog to make sure it is not running, so I shouldn&amp;#39;t be getting a random reset in the middle of programming.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reflash nRF52832 through SWD</title><link>https://devzone.nordicsemi.com/thread/217804?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2019 14:42:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:490d0903-6fcf-4afc-9cb3-a5f7972d7f49</guid><dc:creator>NicholasC</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;/p&gt;
&lt;p&gt;Thanks for the link; I hadn&amp;#39;t seen it. I think that I am following the programming flow laid out in your link, but I&amp;#39;m still having errors on writing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reflash nRF52832 through SWD</title><link>https://devzone.nordicsemi.com/thread/217779?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2019 13:48:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea14c374-21f2-4c97-8f05-a866529b7098</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Have you seen?&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/nwp_027/WP/nwp_027/intro.html?cp=12_5"&gt;https://infocenter.nordicsemi.com/topic/nwp_027/WP/nwp_027/intro.html?cp=12_5&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If this doesn&amp;#39;t answer your question, then I can check&amp;nbsp;internally.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>