<?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>NCS/9160: do I have to have uart0 as console?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/94962/ncs-9160-do-i-have-to-have-uart0-as-console</link><description>I&amp;#39;m moving from NRF9160DK to a custom board, where it has no UART. I plan to just use RTT for debugging messages. 
 However, I found if I delete the section which defines uart0 in the nrf9160dk_nrf9160_common.dts file, I won&amp;#39;t be able to see RTT output</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 Dec 2022 23:16:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/94962/ncs-9160-do-i-have-to-have-uart0-as-console" /><item><title>RE: NCS/9160: do I have to have uart0 as console?</title><link>https://devzone.nordicsemi.com/thread/401812?ContentTypeID=1</link><pubDate>Wed, 21 Dec 2022 23:16:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db4eb4c9-057e-4b72-8d72-b4a5da3ed93e</guid><dc:creator>bluebeam</dc:creator><description>&lt;p&gt;I did try to comment out those lines as you mentioned. But I found I have to at least keep the line &amp;quot;CONFIG_CONSOLE=y&amp;quot; to have RTT working. Otherwise the RTT viewer shows nothing. &lt;/p&gt;
&lt;p&gt;Strange. There&amp;#39;s definitely some complicated relationship between those CONFIGs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS/9160: do I have to have uart0 as console?</title><link>https://devzone.nordicsemi.com/thread/401785?ContentTypeID=1</link><pubDate>Wed, 21 Dec 2022 16:43:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7abdbfd3-9e73-41f9-b4cc-de963d6ad6ce</guid><dc:creator>DamoL</dc:creator><description>&lt;p&gt;Ah yes sorry. I am looking at a different project from when I first had this issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Looks like you already found it, but you&amp;nbsp;&lt;span&gt;&amp;nbsp;nrf9160dk_nrf9160ns_defconfig can be &lt;span style="font-size:12px;"&gt;edited&lt;/span&gt;&amp;nbsp;for your board folder.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For reference mine now looks like this. It will probably get rid of the error you have above.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;# SPDX-License-Identifier: Apache-2.0

CONFIG_SOC_SERIES_NRF91X=y
CONFIG_SOC_NRF9160_SICA=y
CONFIG_BOARD_NRF9160DK_NRF9160NS=y

# Enable MPU
CONFIG_ARM_MPU=y

# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y

# Enable TrustZone-M
CONFIG_ARM_TRUSTZONE_M=y

# This Board implies building Non-Secure firmware
CONFIG_TRUSTED_EXECUTION_NONSECURE=y

# enable GPIO
CONFIG_GPIO=y

# # Enable uart driver            #COMMENT THIS OUT
# CONFIG_SERIAL=y                 #COMMENT THIS OUT
#                                 #COMMENT THIS OUT
# # enable console                #COMMENT THIS OUT
# CONFIG_CONSOLE=y                #COMMENT THIS OUT
# CONFIG_UART_CONSOLE=y           #COMMENT THIS OUT&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS/9160: do I have to have uart0 as console?</title><link>https://devzone.nordicsemi.com/thread/401628?ContentTypeID=1</link><pubDate>Wed, 21 Dec 2022 06:03:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6b1cb9c-354f-4a23-81c8-09f2f0cd6fe7</guid><dc:creator>bluebeam</dc:creator><description>&lt;p&gt;Now I see some error at the very beginning of app starting. It seems someone still try to use the UART_0 port. But this doesn&amp;#39;t seem to affect anything else. My app can continue if I ignore it.&lt;/p&gt;
&lt;div style="background-color:#1e1e1e;color:#d4d4d4;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt;E: Cannot bind UART_0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt;E: UART could not be initialized: -&lt;/span&gt;&lt;span style="color:#569cd6;"&gt;22&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS/9160: do I have to have uart0 as console?</title><link>https://devzone.nordicsemi.com/thread/401611?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2022 23:21:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c992540f-838a-4807-8ef4-6a760f74bfa7</guid><dc:creator>bluebeam</dc:creator><description>&lt;p&gt;I don&amp;#39;t think I have a SPM folder. I only have one prj.conf within my source folder.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS/9160: do I have to have uart0 as console?</title><link>https://devzone.nordicsemi.com/thread/401610?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2022 23:20:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8ccb876-e272-4e2f-8379-4f4626b0b3fd</guid><dc:creator>bluebeam</dc:creator><description>&lt;p&gt;Setting CONFIG_SERIAL=n alone doesn&amp;#39;t work either. But I got a warning saying the value has been set in my copy of nrf9160dk_nrf9160_ns_defconfig. So I went there and comment out the line. But that still doesn&amp;#39;t work. Finally I comment out the line &amp;quot;CONFIG_SERIAL=y&amp;quot; in&amp;nbsp; nrf9160dk_nrf9160_defconfig (the non NS version) and that works. Now I don&amp;#39;t need to have a unused uart0 in my nrf9160dk_nrf9160_common.dts file and I still have RTT working as expected.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s strange why it has to be the non-NS version but not the NS version of defconfig. I&amp;#39;m building my application as the NS version. I don&amp;#39;t see how the defconfig file was referenced by any of the DTS or DTSI files.&lt;/p&gt;
&lt;p&gt;Is there any guide explaining the relationship and dependencies among these CONFIG_SERIAL/CONFIG_CONSOLE/CONFIG_LOG/CONFIG_UART...etc. It&amp;#39;s very confusing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS/9160: do I have to have uart0 as console?</title><link>https://devzone.nordicsemi.com/thread/401479?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2022 10:48:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f8373fc-9e97-4e7a-8793-d70b2dd7af6f</guid><dc:creator>DamoL</dc:creator><description>&lt;p&gt;Check your prj.conf in you SPM folder. I had&amp;nbsp;&lt;span&gt;CONFIG_SERIAL=y within that and that was overwriting the&amp;nbsp;CONFIG_SERIAL=n in my project.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I went round the houses creating functions to disable UART0 in runtime before I realised that was there.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS/9160: do I have to have uart0 as console?</title><link>https://devzone.nordicsemi.com/thread/401231?ContentTypeID=1</link><pubDate>Mon, 19 Dec 2022 11:52:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:417d54dc-6707-49e2-b939-76c10ab2c9ba</guid><dc:creator>Kenneth</dc:creator><description>[quote user=""]Nor can I set the uart0 to &amp;quot;disabled&amp;quot;[/quote]
&lt;p&gt;This should work, but can you also set CONFIG_SERIAL=n?&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>