I tested direct_test_mode sample on nRF5340 device. But I found uart_poll_in() always return -1.
The following is debug messages of RTT Viewer.
# SEGGER J-Link RTT Viewer V7.80c Terminal Log File
# Compiled: 16:09:36 on Sep 27 2022
# Logging started @ 26 Jul 2023 13:26:21
00> [00:00:00.000,762] <inf> ipc_uart: IPC service instance opened
00> [00:00:00.001,434] <inf> ipc_uart: IPC endpoint bonded
00> [00:00:00.001,831] <inf> ipc_uart: UART ipc driver initialized for device: uart@41013000
00> *** Booting Zephyr OS build v3.2.99-ncs2 ***
00> Starting Direct Test Mode example
00> UART device is ready
00> DTM initialization ok
00> uart_poll_in() return -1
00> uart_poll_in() return -1
00> uart_poll_in() return -1
...
Procedures to reproduce this issue are as follows.
1. Unzipping direct_test_mode.zip to D:\ncs\v2.3.0\nrf\samples\bluetooth\ folder.
2. cd D:\ncs\v2.3.0\nrf\samples\bluetooth\
3. west build -b nrf5340dk_nrf5340_cpunet
4. west flash
5. Rebooting nRF5340 device and connecting to RTT Viewer.