<?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>No UART output from Printf()</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64627/no-uart-output-from-printf</link><description>Hi, 
 I am using an nRF52840 Dongle with an external debugger and an external UART, provided by a USB to UART adapter, its an FTDI board. 
 I have modified my overlay file, as below to enable the UART which is connected to the FTDI adapter.. 
 
 I am</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 22 Aug 2020 11:26:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64627/no-uart-output-from-printf" /><item><title>RE: No UART output from Printf()</title><link>https://devzone.nordicsemi.com/thread/265842?ContentTypeID=1</link><pubDate>Sat, 22 Aug 2020 11:26:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:260c8494-ef40-43a9-a0a4-25280590f422</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;I got this working by adding the following line to the prj.conf f.le.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_UART_CONSOLE=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Im now seeing the printf() as expected.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="mceItem mceNonEditable mceInsertMediaItem mceInsertMediaItem mceInsertMediaItemImage" style="color:transparent;height:240px;width:320px;" id="pastedimage1598095807153v1"&gt;...&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No UART output from Printf()</title><link>https://devzone.nordicsemi.com/thread/265422?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2020 22:41:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cab0c1ca-5f05-4c6c-9bc0-fc0dbef31b4e</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;No, it doesn&amp;#39;t seem to make any difference.&lt;/p&gt;
&lt;p&gt;My overlay file is as follows&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart0 {
//  compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;
  compatible = &amp;quot;nordic,nrf-uart&amp;quot;; 
  status = &amp;quot;okay&amp;quot;;  
  current-speed = &amp;lt;115200&amp;gt;;
  tx-pin = &amp;lt;29&amp;gt;;
  rx-pin = &amp;lt;31&amp;gt;;
//  rts-pin = &amp;lt;22&amp;gt;;
//  cts-pin = &amp;lt;17&amp;gt;;
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;and my prj.conf file is&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_STDOUT_CONSOLE=y
CONFIG_SHELL=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I see this&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1597876873353v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;with CONFIG_SHELL=y not set, its a black screen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No UART output from Printf()</title><link>https://devzone.nordicsemi.com/thread/265144?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 14:04:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48d6ccea-6160-4df0-8515-b6f0430c2239</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;Unfortunately I have managed to brick it, so I cant try it. I have opened a separate ticket here&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/64921/nrf52840-dongle-bricked-after-programming"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/64921/nrf52840-dongle-bricked-after-programming&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Rod&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No UART output from Printf()</title><link>https://devzone.nordicsemi.com/thread/265138?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 13:56:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f38f5166-52f4-460f-809f-7dc982a08ac5</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Rod,&lt;br /&gt;Do you see any difference in behavior if you&amp;nbsp;use:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt; compatible = &amp;quot;nordic,nrf-uart&amp;quot;; &lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No UART output from Printf()</title><link>https://devzone.nordicsemi.com/thread/265127?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 13:28:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c29bd519-c240-4f44-aba1-eb7780850b79</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;Initially I did not have the shell enabled and was just running the Hello World sample as normal. I only enabled the shell command to prove that I have set up the UART correctly and that the adapter was working.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Rod&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No UART output from Printf()</title><link>https://devzone.nordicsemi.com/thread/265126?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 13:25:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa59093c-2614-495a-bb4d-ded6f599c2a0</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;I do not think that you should need to enable &amp;quot;shell&amp;quot; when running this sample.&lt;br /&gt;Printk will print out on the CONSOLE which is default enabled when running on the Dongle.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;So the only thing you should do is to run the sample unmodified with .overlay file to change the &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/master/boards/arm/nrf52840dongle_nrf52840/nrf52840dongle_nrf52840.dts#L103" rel="noopener noreferrer" target="_blank"&gt;UART pins&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No UART output from Printf()</title><link>https://devzone.nordicsemi.com/thread/264868?ContentTypeID=1</link><pubDate>Mon, 17 Aug 2020 12:38:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6667e1a0-041b-47b9-8780-94f9d0e14480</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think thats it. I have used this before without flow control to save on the pin count.&lt;/p&gt;
&lt;p&gt;Rod&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No UART output from Printf()</title><link>https://devzone.nordicsemi.com/thread/264865?ContentTypeID=1</link><pubDate>Mon, 17 Aug 2020 12:35:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9663468f-ebe8-4461-996e-d41868d882aa</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Rod,&lt;/p&gt;
&lt;p&gt;I think the issue is that you have not enabled flow control.&lt;br /&gt;&lt;br /&gt;Please enable that in prj.conf.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No UART output from Printf()</title><link>https://devzone.nordicsemi.com/thread/264777?ContentTypeID=1</link><pubDate>Mon, 17 Aug 2020 08:28:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce31dcde-453b-48ac-a7ee-7e93228741b0</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;I have tried switching the RX and TX lines and I have verified the adapter works on other boards. Surely if there was a hardware problem with a faulty adapter or RX/TX swapped, the shell wouldn&amp;#39;t work? As you will see above, I am able to both transmit and receive via the shell which makes me think the hardware is OK? Or am I missing something?&lt;/p&gt;
&lt;p&gt;Rod&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No UART output from Printf()</title><link>https://devzone.nordicsemi.com/thread/264744?ContentTypeID=1</link><pubDate>Mon, 17 Aug 2020 07:19:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5df6d1b6-b658-4c56-941e-b79696cf333d</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Rod,&lt;/p&gt;
&lt;p&gt;Sorry, there was a typo. I&amp;#39;ve changed the post so it is changed to the correct name: &amp;quot;nrf52840dongle_nrf52840.overlay&amp;quot;.&lt;br /&gt;Verify the tx and rx lines are correct.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Usually the issue could actually be having the tx/rx lines switched.&lt;br /&gt;&lt;br /&gt;Please also verify that the FTDI adapter works on another known device, so we can confirm that the adapter is not the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No UART output from Printf()</title><link>https://devzone.nordicsemi.com/thread/264102?ContentTypeID=1</link><pubDate>Tue, 11 Aug 2020 13:55:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82da7950-ac1c-456b-a6cd-c2e629065b6c</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;Yes, I renamed the overlay file. Please can you confirm the name, I think you have typo above, I assume it should be &amp;nbsp;&lt;span&gt;nrf52840dongle_nrf52840.overlay and not&amp;nbsp;nrf52840dongle_nrf5240.overlay as above?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I don&amp;#39;t have an LA but the FTDI adapter has LEDS which flash when data is passing though. It lights when I have the shell&amp;nbsp;&lt;/span&gt;enabled, but not when shell is disabled.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I guess my overall file must be correct or I would not be able to transmit and received over the shell?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Rod&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No UART output from Printf()</title><link>https://devzone.nordicsemi.com/thread/264098?ContentTypeID=1</link><pubDate>Tue, 11 Aug 2020 13:46:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c0a8920-3b56-4ee6-ab9b-bbdc16c04a07</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Rod,&lt;br /&gt;Could you please connect a logic analyzer to the pins to actually check if it&amp;#39;s sending out anything.&lt;br /&gt;&lt;br /&gt;Did you name the overlay file &amp;quot;nrf52840dongle_nrf52840.overlay&amp;quot;?&lt;br /&gt;If not the UART0 may still be the default option:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart0 {
	compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
	tx-pin = &amp;lt;20&amp;gt;;
	rx-pin = &amp;lt;24&amp;gt;;
	rts-pin = &amp;lt;17&amp;gt;;
	cts-pin = &amp;lt;22&amp;gt;;
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>