<?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>How to divert RTT logging to uart1 in Zephyr</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83517/how-to-divert-rtt-logging-to-uart1-in-zephyr</link><description>I&amp;#39;m currently using Zephyr with Nordic Segger v5.50c. 
 Most of the code uses NRF_LOG, NRF_ERR statements which are printed to the Nordic Segger terminal. 
 I also configured the dts to use uart0, which is connected to a modem and is working fine. 
 I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Jan 2022 13:55:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83517/how-to-divert-rtt-logging-to-uart1-in-zephyr" /><item><title>RE: How to divert RTT logging to uart1 in Zephyr</title><link>https://devzone.nordicsemi.com/thread/349280?ContentTypeID=1</link><pubDate>Mon, 24 Jan 2022 13:55:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b94fe92e-2690-4d32-a457-28e7a907c013</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want uart1 to be the console output, you&amp;nbsp;populate the my_application/boards/nrf52840dk_nrf52840.overlay file with this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
  chosen {
    zephyr,console = &amp;amp;uart1;
  };
};

&amp;amp;uart1 {
  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;33&amp;gt;;
  rx-pin = &amp;lt;34&amp;gt;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then re-configure and flash your project.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to divert RTT logging to uart1 in Zephyr</title><link>https://devzone.nordicsemi.com/thread/349271?ContentTypeID=1</link><pubDate>Mon, 24 Jan 2022 13:26:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de0215d2-87ae-4f5c-b5e5-50e7fac4f231</guid><dc:creator>ephimee</dc:creator><description>&lt;p&gt;I now have:&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;And now hello world works.&lt;/p&gt;
&lt;p&gt;How do I make it work for uart1 in my &amp;quot;big&amp;quot; project?&lt;/p&gt;
&lt;p&gt;I tried to copy the same settings from hello world to my project, but I don&amp;#39;t get any output.&lt;/p&gt;
&lt;p&gt;This is my prj.conf:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_NANO=n
CONFIG_SIZE_OPTIMIZATIONS=y

CONFIG_REBOOT=y
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_HEAP_MEM_POOL_SIZE=32768
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_STACK_SENTINEL=y

CONFIG_LOG=y
CONFIG_LOG_STRDUP_BUF_COUNT=32
CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=4096
CONFIG_I2C_LOG_LEVEL_OFF=y

CONFIG_DEBUG=y
CONFIG_ASSERT=y
CONFIG_ASSERT_LEVEL=2
CONFIG_LOG_BACKEND_UART=y
CONFIG_LOG_BACKEND_RTT=n
CONFIG_USE_SEGGER_RTT=n

CONFIG_UART_CONSOLE=y
CONFIG_RTT_CONSOLE=n

CONFIG_I2C=y
CONFIG_WATCHDOG=y
CONFIG_NRFX_UARTE0=y
CONFIG_NRFX_UARTE1=y
CONFIG_NRFX_UARTE=y
CONFIG_UART_ASYNC_API=y
CONFIG_FLASH=y
CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_OFFLOAD=y

CONFIG_NET_IPV4=y
CONFIG_NET_IPV6=n

CONFIG_LWM2M=y
CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP=y
CONFIG_LWM2M_RD_CLIENT_ENDPOINT_NAME_MAX_LENGTH=64
CONFIG_LWM2M_ENGINE_DEFAULT_LIFETIME=900
CONFIG_LWM2M_COAP_BLOCK_SIZE=512
CONFIG_COAP_INIT_ACK_TIMEOUT_MS=6000
CONFIG_LWM2M_ENGINE_MAX_PENDING=10
CONFIG_LWM2M_ENGINE_MAX_REPLIES=10

CONFIG_LWM2M_DTLS_SUPPORT=y
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y
CONFIG_NET_SOCKETS_OFFLOAD_TLS=n
CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS=4
CONFIG_NET_SOCKETS_ENABLE_DTLS=y
CONFIG_MBEDTLS=y
CONFIG_MBEDTLS_TLS_VERSION_1_2=y
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=1500
CONFIG_MBEDTLS_CIPHER_CCM_ENABLED=y
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_ENABLED=n
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED=y
CONFIG_LWM2M_CONN_MON_OBJ_SUPPORT=y
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to divert RTT logging to uart1 in Zephyr</title><link>https://devzone.nordicsemi.com/thread/349124?ContentTypeID=1</link><pubDate>Mon, 24 Jan 2022 07:30:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6cc04dba-cc89-4c3b-b71e-bd21c8479fdf</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;printk uses the console backend for printing. You would want UART_CONSOLE set in this particular case, just to ensure that the pinout itself works as expected. It is very important to verify that the pinout and hardware connection is in order first, before jumping straight to the logging subsys configurations.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to divert RTT logging to uart1 in Zephyr</title><link>https://devzone.nordicsemi.com/thread/348999?ContentTypeID=1</link><pubDate>Fri, 21 Jan 2022 15:31:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e46bda29-4a70-4282-8437-d74891a54f80</guid><dc:creator>ephimee</dc:creator><description>[quote userid="2115" url="~/f/nordic-q-a/83517/how-to-divert-rtt-logging-to-uart1-in-zephyr/348914#348914"]Do you mean LOG_INF?[/quote]
&lt;p&gt;Yes, sorry for the confusion, I meant LOG_INF.&lt;/p&gt;
&lt;p&gt;I still don&amp;#39;t have logging.&lt;/p&gt;
&lt;p&gt;This is my main.c:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;zephyr.h&amp;gt;
#include &amp;lt;sys/printk.h&amp;gt;

void main(void)
{
	printk(&amp;quot;Hello World! %s\n&amp;quot;, CONFIG_BOARD);
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;My overlay:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
  
  chosen {
    zephyr,console = &amp;amp;uart0;
  };
};

&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;33&amp;gt;;
  rx-pin = &amp;lt;34&amp;gt;;
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;My CMakeLists.txt:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;# SPDX-License-Identifier: Apache-2.0
  
cmake_minimum_required(VERSION 3.13.1)

# Set board folder
set(BOARD_ROOT ${CMAKE_CURRENT_LIST_DIR})

# Include the expansion board definition
set(SHIELD overlay_folder)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(hello_world)

target_sources(app PRIVATE src/main.c)
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;My prj.conf:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Console
CONFIG_UART_CONSOLE=n
CONFIG_RTT_CONSOLE=n

CONFIG_LOG_BACKEND_RTT=n
CONFIG_USE_SEGGER_RTT=n

# Logging
CONFIG_LOG=y
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: How to divert RTT logging to uart1 in Zephyr</title><link>https://devzone.nordicsemi.com/thread/348914?ContentTypeID=1</link><pubDate>Fri, 21 Jan 2022 12:27:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59775920-343f-45a4-b4f8-8b44515505a2</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My apologies for misunderstanding.&lt;/p&gt;
[quote user="ephimee"]because hello world uses printk and my project uses NRF_LOG?[/quote]
&lt;p&gt;Do you mean LOG_INF? NRF_LOG is for nRF5 SDK.&lt;/p&gt;
&lt;p&gt;If you get output using printk(), then the serial output is in order.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To enable LOG printing, in different modules, this is set explicitly in kconfig:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.zephyrproject.org/latest/reference/logging/index.html#logging-kconfig"&gt;https://docs.zephyrproject.org/latest/reference/logging/index.html#logging-kconfig&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;here&amp;#39;s the log subsys docs as well:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.zephyrproject.org/latest/reference/logging/index.html"&gt;https://docs.zephyrproject.org/latest/reference/logging/index.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;First, to enable log, you need to add:&lt;/p&gt;
&lt;p&gt;CONFIG_LOG=y&lt;/p&gt;
&lt;p&gt;CONFIG_LOG_BACKEND_UART=y&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then you set the desired level for the module you want to log from in kconfig as well.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to divert RTT logging to uart1 in Zephyr</title><link>https://devzone.nordicsemi.com/thread/348874?ContentTypeID=1</link><pubDate>Fri, 21 Jan 2022 10:09:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccc9da35-d116-495d-9bcb-eb7edfd471e6</guid><dc:creator>ephimee</dc:creator><description>&lt;p&gt;I don&amp;#39;t really understand, because hello world uses printk and my project uses NRF_LOG? That is not the same and cannot be compared.&lt;/p&gt;
&lt;p&gt;Or maybe this is the problem that NRF_LOG cannot write to uart1?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to divert RTT logging to uart1 in Zephyr</title><link>https://devzone.nordicsemi.com/thread/348694?ContentTypeID=1</link><pubDate>Thu, 20 Jan 2022 12:35:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15e9a09a-acd4-4e8e-92d8-a6268c05576a</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you add this overlay to the hello_world example, for testing purposes, do you get any output on uart1 then?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to divert RTT logging to uart1 in Zephyr</title><link>https://devzone.nordicsemi.com/thread/348423?ContentTypeID=1</link><pubDate>Wed, 19 Jan 2022 08:20:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aeee23b8-25a8-4f9e-b6fc-650023cd705f</guid><dc:creator>ephimee</dc:creator><description>&lt;p&gt;Because I&amp;#39;m pretty new to Zephyr, I thought of a way to verify the uart1 connection.&lt;/p&gt;
&lt;p&gt;In order to do this, I used an old project not based on Zephyr. It is based on the app_uart example from the SDK 16 library.&lt;br /&gt;The project uses a BG96 modem, so what I did is change the pins of the BG96 to the uart1. Now on the USB FTDI I can see the AT commands coming in (firmware tries to communicate with BG96), thus verifying that the hardware is connected correctly and that the NRF is able to communicate over it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to divert RTT logging to uart1 in Zephyr</title><link>https://devzone.nordicsemi.com/thread/348415?ContentTypeID=1</link><pubDate>Wed, 19 Jan 2022 07:50:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b425d278-d3cc-42e2-9d3e-75b5373360ec</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you scope the TXD pin (P1.01) and see if anything outputs on this pin?&lt;/p&gt;
&lt;p&gt;Note that this pin is not connected to the USB-UART bridge on the debugger side, so you have to manually connect your own USB-UART adapter to these two pins that you defined.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to divert RTT logging to uart1 in Zephyr</title><link>https://devzone.nordicsemi.com/thread/348381?ContentTypeID=1</link><pubDate>Tue, 18 Jan 2022 20:19:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6f4e717-ffb5-4e76-ad6c-06d71922eb09</guid><dc:creator>ephimee</dc:creator><description>&lt;p&gt;I have the following changes in prj.conf:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_LOG_BACKEND_UART=y
CONFIG_LOG_BACKEND_RTT=n
CONFIG_USE_SEGGER_RTT=n
CONFIG_NRFX_UARTE1=y
CONFIG_NRFX_UARTE=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Now I don&amp;#39;t get any logging in terminal, but also no logging on uart1.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to divert RTT logging to uart1 in Zephyr</title><link>https://devzone.nordicsemi.com/thread/348059?ContentTypeID=1</link><pubDate>Mon, 17 Jan 2022 13:45:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf8eb112-3a40-436a-911d-5cf912be0c84</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="ephimee"]In the terminal window of Segger I still see all the logging.[/quote]
&lt;p&gt;This is because you still have RTT enabled.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I added the same overlay to hello_world (no RTT enabled), and it prints on the tx-pin (P1.01) at my end:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1642427092143v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to divert RTT logging to uart1 in Zephyr</title><link>https://devzone.nordicsemi.com/thread/347987?ContentTypeID=1</link><pubDate>Mon, 17 Jan 2022 10:52:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:077b9f72-c242-4889-bcb8-82bb6f23683c</guid><dc:creator>ephimee</dc:creator><description>&lt;p&gt;I&amp;#39;ve added this to the existing overlay:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {

  chosen {
    zephyr,console = &amp;amp;uart1;
  };
};

&amp;amp;uart1 {
  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;33&amp;gt;;
  rx-pin = &amp;lt;34&amp;gt;;
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I added this to prj.conf:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_LOG_BACKEND_UART=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_NRFX_UARTE1=y
CONFIG_NRFX_UARTE=y
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But I still don&amp;#39;t get anything on uart1. Am I missing something?&lt;/p&gt;
&lt;p&gt;In the terminal window of Segger I still see all the logging.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to divert RTT logging to uart1 in Zephyr</title><link>https://devzone.nordicsemi.com/thread/347949?ContentTypeID=1</link><pubDate>Mon, 17 Jan 2022 08:54:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e0ccf49-8d4a-4937-a6c5-0922418565d5</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="ephimee"]In the overlay file the use of &amp;amp;gpio1 is not allowed, but it is allowed in the dts?[/quote]
&lt;p&gt;The &amp;quot;tx-pin&amp;quot; and &amp;quot;rx-pin&amp;quot; members of the uartX device reflects how the hardware peripheral requires you to specify a GPIO, as shown here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/uarte.html?cp=4_0_0_5_33_8_23#register.PSEL.TXD"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf52840/uarte.html?cp=4_0_0_5_33_8_23#register.PSEL.TXD&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The &amp;quot;B&amp;quot; field here specifies the port for bus peripherals such as UARTE.&lt;/p&gt;
&lt;p&gt;P1.01 will then translate to &amp;quot;33&amp;quot; decimal in this register.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to divert RTT logging to uart1 in Zephyr</title><link>https://devzone.nordicsemi.com/thread/347945?ContentTypeID=1</link><pubDate>Mon, 17 Jan 2022 08:45:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5edd8735-1d4a-4fa1-b4c4-576da4c9c6f8</guid><dc:creator>ephimee</dc:creator><description>&lt;p&gt;In the overlay file the use of &amp;amp;gpio1 is not allowed, but it is allowed in the dts?&lt;/p&gt;
&lt;p&gt;Can you explain this?&lt;/p&gt;
&lt;p&gt;In the overlay:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart1 {
  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;&amp;amp;gpio1 1 0&amp;gt;;
  rx-pin = &amp;lt;&amp;amp;gpio1 2 0&amp;gt;;
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In the dts:&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;44&amp;gt;;
  rx-pin = &amp;lt;30&amp;gt;;

  bg96 {
    compatible = &amp;quot;quectel,bg96&amp;quot;;
    label = &amp;quot;BG96&amp;quot;;

    reset-gpios = &amp;lt;&amp;amp;gpio1 14 0&amp;gt;;
    power-key-gpios = &amp;lt;&amp;amp;gpio1 15 0&amp;gt;;
    ring-indicator-gpios = &amp;lt;&amp;amp;gpio0 29 0&amp;gt;;
    dtr-gpios = &amp;lt;&amp;amp;gpio1 11 0&amp;gt;;
    enable-gpios = &amp;lt;&amp;amp;gpio0 27 0&amp;gt;;
  };
};
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to divert RTT logging to uart1 in Zephyr</title><link>https://devzone.nordicsemi.com/thread/347071?ContentTypeID=1</link><pubDate>Tue, 11 Jan 2022 08:04:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e12c6ce1-b800-46a8-9c9a-229330db8115</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To change the console from uart0 to uart1, you&amp;nbsp;can define a DT overlay file that redefines uart,console:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts#L15"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/main/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts#L15&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Ie. similar to this:&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;;
    ...rest of configuration
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Another way to switch the logging interface from uart0 to uart1 is simply to change the pin out on each of the &amp;amp;uart0 and &amp;amp;uart1 instances in device tree.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]I also noticed CONFIG_NRFX_UARTE0, but CONFIG_NRFX_UARTE1 does not exist? Maybe only uart0 is supported?&lt;br /&gt;Do I have to reconfigure uart1 for the modem?[/quote]
&lt;p&gt;It should exist:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/kconfig/CONFIG_NRFX_UARTE1.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/kconfig/CONFIG_NRFX_UARTE1.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;*edit*&lt;/p&gt;
&lt;p&gt;To answer your main question, how to set RTT or UART backend, please see these symbols for the logging backend:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/kconfig/CONFIG_LOG_BACKEND_UART.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/kconfig/CONFIG_LOG_BACKEND_UART.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/kconfig/CONFIG_LOG_BACKEND_RTT.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.8.0/kconfig/CONFIG_LOG_BACKEND_RTT.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>