<?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 program an external board using a DK board?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102480/how-to-program-an-external-board-using-a-dk-board</link><description>Before I start, I beg that any responses do NOT link to any other threads. There are 20 threads across the internet in different forums documenting how they got external programming to work, but the biggest issue is that they&amp;#39;re all different, and use</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 02 Aug 2023 10:37:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102480/how-to-program-an-external-board-using-a-dk-board" /><item><title>RE: How to program an external board using a DK board?</title><link>https://devzone.nordicsemi.com/thread/439465?ContentTypeID=1</link><pubDate>Wed, 02 Aug 2023 10:37:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e21fa3e4-802a-4d66-a25a-aec85e72e6c4</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am sorry for the frustration. I see that you are using the latest version of the DK, which again changed the names of these pins, apparently.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The queue here is that the debugger doesn&amp;#39;t power your external device (Itsy Bitsy). It rather checks whether it can detect the already powered device, and if it does, it will use the P20 header (from your picture) instead of programming the nRF52840 on the DK itself.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is why you see this picture a lot in these kind of &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/14058/external-programming-using-nrf52-dk/53757"&gt;posts&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1690965690412v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What it tells you is that you need to both power the Itsy Bitsy, by connecting VDD and GND from the DK to the custom board, and then you need to connect VTG* and GND DETECt to VDD and GND respectively, at the same time as the external board needs to be powered.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In the version that you are using, the GND detect has been removed, and the VTG has changed the name to SWD_SEL. So what you need to do is to make sure the Itsy Bitsy is powered (e.g. by connecting it to GND and VDD), and then you need to connect SWD_SEL to VDD as well. When SWD_SEL is set high, that will trigger the onboard debugger to use the P20 debug out port. Then all you need to do is to connect SWD_CLK and SWD_IO, which are the logic signals actually used to program the Itsy Bitsy.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Try that, and let me know if it doesn&amp;#39;t help.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to program an external board using a DK board?</title><link>https://devzone.nordicsemi.com/thread/439461?ContentTypeID=1</link><pubDate>Wed, 02 Aug 2023 10:17:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8521919d-b11e-4729-ad63-052fe1d8d5c4</guid><dc:creator>Bk37</dc:creator><description>&lt;p&gt;Solved! For anyone with a similar issue, here&amp;#39;s what I found and how I solved it.&lt;/p&gt;
&lt;p&gt;1. The official documentation severely lacks in some areas, and this is one of the worst areas. The official documentation ambiguously suggest methods that can fry not &lt;em&gt;only&lt;/em&gt; the target board but &lt;em&gt;also&lt;/em&gt; your really expensive and important development board. Actually, in the same section for &lt;em&gt;other&lt;/em&gt; chips (such as nRF52832), it makes it very clear what &lt;em&gt;not&lt;/em&gt; to do, however, the nRF52840 does not get this warning, despite the same risk being present (ask me how I know...).&lt;/p&gt;
&lt;p&gt;2. The documentation is not just ambiguous, it&amp;#39;s downright incorrect, as is the silkscreen on my board. Despite the difference in pin names on my silkscreen, I decided to try external programming using not the same &lt;em&gt;pin names&lt;/em&gt; as other forum posters&amp;#39; diagrams, but actually the same physical pin locations, despite a discrepancy in apparent silkscreen pin names. This is the THIRD (and none of them related) silkscreen pin labeling error I&amp;#39;ve seen on this (nRF52840) dev board.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the pin layout that worked for me:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/5123.Untitled.png" /&gt;&lt;/p&gt;
&lt;p&gt;Make sure to bridge the two pins with yellow covering them in that image.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ONLY&lt;/strong&gt; plug in the programming board, &lt;strong&gt;DO NOT &lt;/strong&gt;plug in the target/external board. The target/external board should &lt;strong&gt;ONLY&lt;/strong&gt; be getting power from the connections to the programming board.&lt;/p&gt;
&lt;p&gt;As for extrapolating this information to another DK board (like nRF52832 DK or nRF52833 DK), this part is not as clear to me since what works for me is NOT what the official documentation describes... however, the basics should be similar.&lt;/p&gt;
&lt;p&gt;Programmer &lt;strong&gt;SWDIO&lt;/strong&gt; to Target &lt;strong&gt;SWDIO&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Programmer &lt;strong&gt;SWD CLK&lt;/strong&gt; to Target &lt;strong&gt;SWD CLK&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Programmer &lt;strong&gt;VDD nRF&lt;/strong&gt; to Target &lt;strong&gt;VDD&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Programmer &lt;strong&gt;GND&lt;/strong&gt; to Target &lt;strong&gt;GND&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Programmer set to external programming (as opposed to internal). For the nRF52840 DK, this is achieved by bridging the two pins covered in yellow in my colored diagram. These two pins are &lt;strong&gt;VTG&lt;/strong&gt; and &lt;strong&gt;VDD nRF&amp;#39;&lt;/strong&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>