This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to divert RTT logging to uart1 in Zephyr

I'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 want to enable uart1 in the dts, and use it for RTT logging as well. For this I read:
https://docs.zephyrproject.org/latest/reference/logging/index.html

On the above they write about frontend and backend logging. But no reference to uart0 or uart1.
It looks like documentation how to write the code, but not how to configure the uart (might be Nordic documentation not Zephyr documentation)

I also found:
https://devzone.nordicsemi.com/f/nordic-q-a/73368/how-to-make-log_inf-and-log_err-print-over-uart0-in-nrf9160

But I don't understand chosen and the other parameters? Can it be this simple?

I also found:
https://devzone.nordicsemi.com/f/nordic-q-a/21189/how-to-enable-uart-or-rtt-logging-in-examples

But I don't see anywhere how to choose which uart to use? Is it uart0 by default?

I also noticed CONFIG_NRFX_UARTE0, but CONFIG_NRFX_UARTE1 does not exist? Maybe only uart0 is supported?
Do I have to reconfigure uart1 for the modem?

Related