<?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>Flashing nRF52840 dongle through SWD interface</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110502/flashing-nrf52840-dongle-through-swd-interface</link><description>Dear community, 
 I&amp;#39;m trying to flash a nRF52840 dongle through the SWD interface, but fail. There are already several nRF52840-dongle flashing posts in the forum, but I obviously misunderstand some of the instructions. 
 ==&amp;gt; does someone see where I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Apr 2024 09:13:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110502/flashing-nrf52840-dongle-through-swd-interface" /><item><title>RE: Flashing nRF52840 dongle through SWD interface</title><link>https://devzone.nordicsemi.com/thread/480383?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2024 09:13:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cde02fad-0b88-401e-83f9-4b15ef5d8de5</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;All the information that is required to program the nRF52840 USB Dongle is in the blog post you refer to. Recovering or Eraseall will allways erase UICR, and the voltage will then fall back to 1.8V as default.&amp;nbsp;The dongle will work wither 1.8V or 3V, the problem you experience is that the nRF52-DK don&amp;#39;t support 1.8V for programming, so the blog post describe how you can overcome that (either by feeding the dongle with external voltage or that you get yourself a J-Link programmer that can support the entire supply range).&lt;/p&gt;
&lt;p&gt;My suggestion if you&amp;nbsp;are not able to make the&amp;nbsp;blog post is to either get an nRF52840-DK (it&amp;#39;s not going to support 1.8V either, but you can then develop directly on the DK) or that you get yourself a SEGGER J-Link.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing nRF52840 dongle through SWD interface</title><link>https://devzone.nordicsemi.com/thread/480262?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2024 15:14:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06d496e7-dd5a-4bb2-92e6-abe6899ada79</guid><dc:creator>Stefantk</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;/p&gt;
&lt;p&gt;thank you for your reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Let me try again, this time, please assume I&amp;#39;m a complete beginner with no prior understanding.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://devzone.nordicsemi.com/guides/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial"&gt;Dongle Programming Tutorial&lt;/a&gt; states&lt;/p&gt;
&lt;blockquote&gt;If you must erase the UICR, make sure that you do not reset the board until after you have &lt;span style="background-color:#00ffff;"&gt;programmed either REGOUT0 directly&lt;/span&gt; or firmware that sets it.&lt;/blockquote&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Do I understand wrongly that this refers to&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;nrfjprog --memwr 0x10001304 ... &lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;as one of the programming steps?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Alternatively, how can I flash a firmware (such as stated in the section &amp;quot;Adapting firmware to set REGOUT0 properly&amp;quot;) when REGOUT0 is on its default 1.8V setting? I read this as &amp;quot;you need a chicken to lay an egg, but you need an egg to raise a chicken&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Ok, I can use a J-Link instead of the nRF52-DK.&lt;/p&gt;
&lt;p&gt;==&amp;gt; do I correctly use &amp;quot;VDD OUT&amp;quot; on the nRF52840-dongle?&lt;/p&gt;
&lt;p&gt;==&amp;gt; will I have to specify &amp;quot;&lt;code&gt;vtref 3000&lt;/code&gt;&amp;quot; for the J-Link, or how will it know to what value to set the logic levels?&lt;/p&gt;
&lt;p&gt;(I ask, because nrfjprog reports that the connection has timed out. Hence, the J-Link cannot establish any connection.)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Lastly, let&amp;#39;s say I take a brand new nRF52840-dongle: how do I actually achieve erasing the whole memory except for REGOUT0? If I don&amp;#39;t start with --recover, then there is a memory protection in place.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for any clarifications,&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing nRF52840 dongle through SWD interface</title><link>https://devzone.nordicsemi.com/thread/480163?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2024 10:48:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec59f64f-6e33-40e8-b6e0-8362cb800051</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;When you execture --recover or --eraseall, then UICR is erased, and VDD will switch to (default) 1.8V, this is lower than what the nRF52-DK can program. You will need to follow description in &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/guides/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial"&gt;nRF52840 Dongle Programming Tutorial&lt;/a&gt;&amp;nbsp; :&lt;/p&gt;
&lt;h2&gt;Recover after an accidental UICR erase&lt;/h2&gt;
&lt;p&gt;You have two options for recovering when the REG0 (VDD) voltage is 1.8 V (typically after a UICR erase):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Either use a debug probe that adapts the logic levels to the target device (for instance a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://www.segger.com/products/debug-probes/j-link/models/j-link-pro/"&gt;J-Link PRO&lt;/a&gt;).&amp;nbsp;&lt;span&gt;Program firmware that&amp;nbsp;&lt;/span&gt;&lt;span&gt;configures&amp;nbsp;&lt;/span&gt;&lt;span&gt;REGOUT0 for 3 V.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Or modify the dongle so that it can be supplied by an external supply and use the nRF52840 DK to program it.
&lt;ol&gt;
&lt;li&gt;Adapt the dongle hardware as described under&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrf52840_dongle%2FUG%2Fnrf52840_Dongle%2Fhw_power_ext_reg_source.html&amp;amp;cp=3_0_5_5_2_1"&gt;External regulated source&lt;/a&gt;&amp;nbsp;in the nRF52840 Dongle documentation.&lt;/li&gt;
&lt;li&gt;Connect VDD from the nRF52840 DK to VDD OUT on the nRF52840 Dongle.&lt;/li&gt;
&lt;li&gt;Program via SWD as you have previously done (but remember to set&amp;nbsp;REGOUT0 this time).&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To set REGOUT0 correctly follow the&amp;nbsp;Adapting firmware to set REGOUT0 properly on the same page.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>