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

Using UART1 for the serial communication

I am using nRF5340DK and would like to send and receive data to computer via UART1 and pins "TX", "RX", "CTS" and "RTS" using USB TO RS232 SERIAL CONVERTER.


This way I would keep UART0 for logging.

But I can't receive or send data via UART1.

I'm using the Segger IDE and the Peripheral_UART for the first nRF5340 DK board and the Central_UART example for the second board.

Im trying to use UART1 in Peripheral_UART example.

For now I changed settings for UART1 in zephyr.dst file

uart1: uart@9000 {
  compatible = "nordic,nrf-uarte";
  reg = < 0x9000 0x1000 >;
  interrupts = < 0x9 0x1 >;
  status = "okay";
  label = "UART_1";
  current-speed = < 0x4b00 >;
  tx-pin = < 0x21 >;
  rx-pin = < 0x20 >;
  rts-pin = < 0x0b >;
  cts-pin = < 0x0a >;
};

And i added in autoconfig.h

#define CONFIG_NRFX_UARTE1 1
#define CONFIG_UART_NRFX 1
#define CONFIG_UART_1_NRF_UARTE 1
#define CONFIG_UART_1_ENHANCED_POLL_OUT 1
#define CONFIG_UART_1_ASYNC 1
#define CONFIG_UART_1_NRF_TX_BUFFER_SIZE 32

It won't work with UART1.

When I switch back to UART0 it works fine.

What could be a problem?