<?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>Using Debug Out (p19) to program 3rd Party nrf52840/nrf52810 boards with issues</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46256/using-debug-out-p19-to-program-3rd-party-nrf52840-nrf52810-boards-with-issues</link><description>I wrote some user data to 3rd party nrf52840 boards flash using the command &amp;quot;nrfjprog --memwr 0x1001084 --val 0x33333333&amp;quot; , when I ran the program the data values was not 0x333333333, 
 but running the command &amp;quot; nrfjprog -- memrd 0x1001084&amp;quot; returned the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Apr 2019 17:18:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46256/using-debug-out-p19-to-program-3rd-party-nrf52840-nrf52810-boards-with-issues" /><item><title>RE: Using Debug Out (p19) to program 3rd Party nrf52840/nrf52810 boards with issues</title><link>https://devzone.nordicsemi.com/thread/183219?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2019 17:18:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:619b71f9-005d-4fb6-939e-211e6c782da8</guid><dc:creator>Olaf</dc:creator><description>&lt;p&gt;Thanks for your help. I have modified the tag-connect so it makes a better connection to the board.&lt;/p&gt;
&lt;p&gt;It works reliable now.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Debug Out (p19) to program 3rd Party nrf52840/nrf52810 boards with issues</title><link>https://devzone.nordicsemi.com/thread/182994?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2019 07:29:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c716f954-ab14-4288-9a8a-02b4ea5ee3a8</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Olaf"]But you have dismissed the case that nrfjprog writes to the &amp;quot;&lt;span&gt;nrf52840 preview DK&amp;quot; when DebugOut have a tag-connect cable attached.&lt;/span&gt;[/quote]
&lt;p&gt;Well, it depends on your HW as well. You need to short the GND detect signal to ground. If that is not done in the device end of the tag-connect cable you should instead short it to GND on the DK (for instance as shown in the image below). This is the signal that determines if the debugger should connect to the onboard nRF52 or via the debug out port.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-a6129111ab434963aa190e88a0e1fcbd/dk_5F00_gnd_5F00_detect.jpg" /&gt;&lt;/p&gt;
[quote user="Olaf"]How can I verify that the .hex files are transferred correctly to 3rd Party board?[/quote]
&lt;p&gt;You can verify that you are debugging the custom board and not the DK by for instance reading out the &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/ficr.html?cp=3_0_0_3_3_0_2#register.DEVICEID-0-1"&gt;DEVICEID &lt;/a&gt;registers and seeing that they are different. If they are not different, then you are always looking at the same device. And if you have a LED or something on your custom board you can of course use the firmware to control it so that you can see that it has been programmed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Debug Out (p19) to program 3rd Party nrf52840/nrf52810 boards with issues</title><link>https://devzone.nordicsemi.com/thread/182690?ContentTypeID=1</link><pubDate>Thu, 18 Apr 2019 00:42:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bcd597c-5666-4c8d-bf97-2b9283a825ba</guid><dc:creator>Olaf</dc:creator><description>[quote userid="7377" url="~/f/nordic-q-a/46256/using-debug-out-p19-to-program-3rd-party-nrf52840-nrf52810-boards-with-issues/182503"]This should not be possible. Are you sure you are programming the same device as you are reading out the data from?[/quote]
&lt;p&gt;No, I am not.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here is my setup: PC -usb- nrf52840 preview DK - DebugOut- tag connect cable - 3rdParty52840 board.&lt;/p&gt;
&lt;p&gt;When I verify the device_id using the memrd command I am getting the same value as I wrote to the 3rd party board. But the problem is I am getting the same device_id when I haven&amp;#39;t attached any 3rd party board to the tag-connect cable!&lt;/p&gt;
&lt;p&gt;But you have dismissed the case that nrfjprog writes to the &amp;quot;&lt;span&gt;nrf52840 preview DK&amp;quot; when DebugOut have a tag-connect cable attached.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How can I verify that the .hex files are transferred correctly to 3rd Party board?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Debug Out (p19) to program 3rd Party nrf52840/nrf52810 boards with issues</title><link>https://devzone.nordicsemi.com/thread/182503?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2019 06:50:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1f4e065-b74e-4d68-b75c-1521819ac14f</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;[quote user="Olaf"][/quote]&lt;/p&gt;
&lt;p&gt;Yes, I verified by reading back with nrfjprog.&lt;/p&gt;
&lt;p&gt;&lt;img style="cursor:zoom-in;" alt=" " height="21" src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/readnrfjp.JPG" width="354" /&gt;&lt;/p&gt;
&lt;p&gt;In the code I read from same addr:&lt;/p&gt;
&lt;p&gt;uint8_t device_id[4];&lt;/p&gt;
&lt;p&gt;memcpy(device_id, (uint8_t *)0x10001084, 4);&lt;/p&gt;
&lt;p&gt;&lt;span&gt;device_id array contains 4x 0xFF in program.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This should not be possible. Are you sure you are programming the same device as you are reading out the data from?&lt;/p&gt;
&lt;p&gt;[quote user="Olaf"][/quote]&lt;/p&gt;
&lt;p&gt;&lt;span&gt;by cutting CB40 and leaving &amp;quot;nrf&amp;nbsp;current measurement open&amp;quot; is it not cutting the power supply to the&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;nrf52840 on the DK?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Yes, but it will not make the onboard debugger use the debut out port instead. That is decided with the GND detect signal (you can see it printed on the PCB for one pin on P20). When that is grounded, the debugger will program/debug the &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf52840_dk/UG/nrf52840_DK/hw_debug_out.html?cp=3_0_4_7_9"&gt;debug out port&lt;/a&gt;. When not, it will program/debug the onboard nRF.&lt;/p&gt;
[quote user="Olaf"]Is there a need to erase the flash area in order to be able to write new values to it?[/quote]
&lt;p&gt;&amp;nbsp;Yes. Writing can only change 1&amp;#39;s to 0&amp;#39;s. Erase changes all bits to 1. This is an inherent property of NOR flash memory.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Debug Out (p19) to program 3rd Party nrf52840/nrf52810 boards with issues</title><link>https://devzone.nordicsemi.com/thread/182431?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2019 14:46:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3713adce-94e1-4ece-ba91-e3958d5173a7</guid><dc:creator>Olaf</dc:creator><description>&lt;p&gt;Yes, I verified by reading back with nrfjprog.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="21" src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/readnrfjp.JPG" width="354" /&gt;&lt;/p&gt;
&lt;p&gt;In the code I read from same addr:&lt;/p&gt;
&lt;p&gt;uint8_t device_id[4];&lt;/p&gt;
&lt;p&gt;memcpy(device_id, (uint8_t *)0x10001084, 4);&lt;/p&gt;
&lt;p&gt;&lt;span&gt;device_id array contains 4x 0xFF in program.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;by cutting CB40 and leaving &amp;quot;nrf&amp;nbsp;current measurement open&amp;quot; is it not cutting the power supply to the&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;nrf52840 on the DK?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is there a need to erase the flash area in order to be able to write new values to it?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Debug Out (p19) to program 3rd Party nrf52840/nrf52810 boards with issues</title><link>https://devzone.nordicsemi.com/thread/182357?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2019 11:38:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e7b9155-f290-402a-b9c2-e9116654640a</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Just so there are no misunderstandings. You write&amp;nbsp;0x33333333, and read it back correctly with nrfjprog? But you have some firmware that reads the same memory address and sees a different value? This looks strange. Can you show details from your source code as well, showing how you read this data and see that it has another value?&lt;/p&gt;
&lt;p&gt;(Regarding SB40 this is not in any way related to this. If you use the &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf52840_dk/UG/nrf52840_DK/hw_debug_out.html?cp=3_0_4_7_9"&gt;debug out&lt;/a&gt; connector, then the GND detect signal will cause the interface MCU to use the pins connected to the debug out port instead of the onboard nRF. It will never be programmed in this case, regardless of SB40.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>