<?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>peripheral_uart, how to separate console and communication ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79904/peripheral_uart-how-to-separate-console-and-communication</link><description>Hi, 
 I work with win10 laptop, Toolchain nrf Connect SDK 1.6.1 on a nrf5340dk. 
 I like to use the uart1 for the console (printk debugging) and the uart0 for communication. 
 In prj.conf I add &amp;quot;CONFIG_NRFX_UARTE1=y&amp;quot;. 
 And in nrf5340_cpuapp_common.dts</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Oct 2021 13:52:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79904/peripheral_uart-how-to-separate-console-and-communication" /><item><title>RE: peripheral_uart, how to separate console and communication ?</title><link>https://devzone.nordicsemi.com/thread/333287?ContentTypeID=1</link><pubDate>Fri, 08 Oct 2021 13:52:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18e99147-71c2-4d93-b687-bcb2b6b36ded</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;You can ignore that warning, that is as expected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peripheral_uart, how to separate console and communication ?</title><link>https://devzone.nordicsemi.com/thread/333251?ContentTypeID=1</link><pubDate>Fri, 08 Oct 2021 11:53:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71656634-ee4c-428d-8c23-30dff801e93f</guid><dc:creator>RHeine</dc:creator><description>&lt;p&gt;Thank you !&lt;/p&gt;
&lt;p&gt;Now it&amp;#39;s work, but I can read an error: &lt;/p&gt;
&lt;p&gt;&amp;lt;wrn&amp;gt; bt_ecc: ECC HCI commands not available&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/error_5F00_uart0Com_5F00_uart1Console.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peripheral_uart, how to separate console and communication ?</title><link>https://devzone.nordicsemi.com/thread/333209?ContentTypeID=1</link><pubDate>Fri, 08 Oct 2021 09:05:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:576ff7a5-b85e-4912-9fc6-53f9a1865a05</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Call the overlay file nrf5340dk_nrf5340_cpuapp.overlay, not prj.overlay.&lt;/p&gt;
&lt;p&gt;Let me know how that changes the behavior.&lt;/p&gt;
&lt;p&gt;You can also try changing the log configs at the bottom of your prj.conf:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_USE_SEGGER_RTT=n
CONFIG_LOG_BACKEND_RTT=n
CONFIG_LOG_BACKEND_UART=y&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peripheral_uart, how to separate console and communication ?</title><link>https://devzone.nordicsemi.com/thread/333185?ContentTypeID=1</link><pubDate>Fri, 08 Oct 2021 07:44:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebd22b2e-b8dd-434f-9d4c-56fa8bd79df2</guid><dc:creator>RHeine</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for your answer.&lt;/p&gt;
&lt;p&gt;I try to make the modification on the prj.overlay file:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8765.prj.overlay"&gt;devzone.nordicsemi.com/.../8765.prj.overlay&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I add CONFIG_NRFX_UARTE1=y in the prj.conf file:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8863.prj.conf"&gt;devzone.nordicsemi.com/.../8863.prj.conf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and in the main.c file I make a function to use the uart:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8032.main.c"&gt;devzone.nordicsemi.com/.../8032.main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I would like to send to the uart &amp;quot;01234&amp;quot; and send to the uart1 the printk &amp;quot;service&amp;quot;,&lt;/p&gt;
&lt;p&gt;but I send on the uart 0 &amp;quot;service&amp;quot; and &amp;quot;01234&amp;quot;.&lt;/p&gt;
&lt;p&gt;What should be done to separate sending of the Tx on uart0 and the printk on uart1 ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Rob&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peripheral_uart, how to separate console and communication ?</title><link>https://devzone.nordicsemi.com/thread/330692?ContentTypeID=1</link><pubDate>Wed, 22 Sep 2021 13:40:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d701e6d9-b99a-47b8-885a-a626bb96f55d</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;In most cases I recommend &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/dts/howtos.html?highlight=overlay#set-devicetree-overlays"&gt;using an overlay file&lt;/a&gt; instead of editing the board files.&lt;/p&gt;
&lt;p&gt;In the overlay file you should set the console to uart1, enable uart1, reconfigure the uart1 pins, and disable i2c1 as it conflicts with uart1:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
    chosen {
        zephyr,console = &amp;amp;uart1;
    };
};

&amp;amp;uart1 {
    status = &amp;quot;okay&amp;quot;;
    tx-pin = &amp;lt;35&amp;gt;;
	rx-pin = &amp;lt;34&amp;gt;;
};

&amp;amp;i2c1 {
	status = &amp;quot;disabled&amp;quot;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The default uart1 pins can not be used, as they are by default used by the network core.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>