<?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>nRF52840DK Logging to UARTE1</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68209/nrf52840dk-logging-to-uarte1</link><description>Hello, 
 Using libuarte I have been able to set up UARTE0 and UARTE1 for main communications, and debug communications respectively. While using UARTE1 to print out debug messages from my own code is nice, I quickly realized that this isn&amp;#39;t really what</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Nov 2020 14:02:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68209/nrf52840dk-logging-to-uarte1" /><item><title>RE: nRF52840DK Logging to UARTE1</title><link>https://devzone.nordicsemi.com/thread/280128?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 14:02:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3da52bdf-6514-454f-a023-4b7414e1acbc</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;RTT is convenient in that it doesn&amp;#39;t require any hardware peripherals other than the debugger, and adds quite little impact to the code run time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unless you have more questions I will consider the case closed then &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840DK Logging to UARTE1</title><link>https://devzone.nordicsemi.com/thread/279983?ContentTypeID=1</link><pubDate>Fri, 13 Nov 2020 21:25:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:897e83ae-cd35-4623-b420-5be910be3c42</guid><dc:creator>flonch</dc:creator><description>&lt;p&gt;Thanks for the information. I originally was looking to have debugging over UART, but RTT seems more favorable now seeing as it would be the same process as programming the custom board more or less.&lt;/p&gt;
&lt;p&gt;I won&amp;#39;t be able to test P18 for a few days until the cable arrives, but your answer does make sense if P20 is output only.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840DK Logging to UARTE1</title><link>https://devzone.nordicsemi.com/thread/279771?ContentTypeID=1</link><pubDate>Thu, 12 Nov 2020 14:55:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6facc1b1-18b7-48b5-9b12-b300ce41f287</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
[quote user="flonch"]nteresting, would setting the logging backend to UART automatically redirect the output to UARTE0 by default if UARTE is being used?[/quote]
&lt;p&gt;Yes. Most of the devices in the nRF52 family only have one UARTE interface (UARTE0), so this is the one that the&amp;nbsp;log interface is setup to use.&amp;nbsp;&lt;/p&gt;
[quote user="flonch"]Is it possible to do RTT and SWD debugging with two nRF52840DK&amp;#39;s? I do not have a custom board yet as I am still trying to work things out with the dev kits before moving forward.[/quote]
&lt;p&gt;This is possible, yes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The easiest way to do it is to get one of the 10-pin SWD cables, and connect the debug out port (P19) on one kit to the debug in port (P18) on another.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This cable can be found many places, including &lt;a href="https://www.adafruit.com/product/1675"&gt;on Adafruit&lt;/a&gt;.&lt;/p&gt;
[quote user="flonch"]I tried to follow the wiring shown&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/51179/debug-out-port-p20-on-nrf52840-dk-debugging-custom-board"&gt;in this thread&lt;/a&gt;, but am not able to debug/program the dev kit which is acting as the custom board. When I try to start RTT, I receive the &amp;quot;could not connect to target&amp;quot; error, with the following log details.[/quote]
&lt;p&gt;I assume this doesn&amp;#39;t work because P20 is designed for debug out only, not debug in, but I will have to double check this with one of my colleagues and get back to you.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840DK Logging to UARTE1</title><link>https://devzone.nordicsemi.com/thread/279575?ContentTypeID=1</link><pubDate>Wed, 11 Nov 2020 16:43:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:569ca988-88f8-4f96-8d76-88b4bb844896</guid><dc:creator>flonch</dc:creator><description>&lt;p&gt;Interesting, would setting the logging backend to UART automatically redirect the output to UARTE0 by default if UARTE is being used?&lt;/p&gt;
&lt;p&gt;Is it possible to do RTT and SWD debugging with two nRF52840DK&amp;#39;s? I do not have a custom board yet as I am still trying to work things out with the dev kits before moving forward.&lt;/p&gt;
&lt;p&gt;I tried to follow the wiring shown&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/51179/debug-out-port-p20-on-nrf52840-dk-debugging-custom-board"&gt;in this thread&lt;/a&gt;, but am not able to debug/program the dev kit which is acting as the custom board. When I try to start RTT, I receive the &amp;quot;could not connect to target&amp;quot; error, with the following log details.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;LOG: J-Link RTT Viewer V6.82b: Logging started.
LOG: Terminal 0 added.
LOG: Connecting to J-Link via USB...
LOG: Device &amp;quot;NRF52840_XXAA&amp;quot; selected.
LOG: InitTarget() start
LOG: InitTarget() end
LOG: InitTarget() start
LOG: InitTarget() end
ERROR: Could not connect to target device.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here is the wiring between the two dev kits:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/5187.untitled.png" /&gt;&lt;/p&gt;
&lt;p&gt;I can see that the dev kit acting as the custom board is on when powering up the main board over USB.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840DK Logging to UARTE1</title><link>https://devzone.nordicsemi.com/thread/279555?ContentTypeID=1</link><pubDate>Wed, 11 Nov 2020 15:43:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e66278f2-e26b-4164-ba14-71a4206c1abe</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What about using UARTE1 for your main communication instead, and UARTE0 for debugging?&lt;/p&gt;
&lt;p&gt;Hardware wise both of these interfaces are identical.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As for connecting RTT on a custom board what you need to do is to expose the SWD debugging interface, namely the SWDIO and SWDCLK pins. By connecting an nRF52840DK to these pins you can program, debug and receive RTT logs from the target.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>