Return to Pattern Library
UART
Echo characters over a UART console
Requires the Temboo extension.
Platform

Nordic

Open in VS Code
Initialize a UART peripheral and echo received characters back over the same interface, confirming serial I/O bring-up and console/logging connectivity.
Applies when
Use this pattern when bringing up serial console/logging connectivity for the first time on a Nordic target, before relying on UART for higher-level protocols (Zephyr shell, custom command parsers, modem AT command interfaces, etc.).
Show pattern details
Hide pattern details
Intent
Implement firmware that initializes a UART peripheral (e.g. the board on-board J-Link CDC UART) and echoes each received character back to the sender, confirming basic serial I/O and interrupt/async UART handling work end-to-end on the target.
Expectation
Characters typed into a serial terminal connected to the board are echoed back immediately and correctly, with no dropped, corrupted, or duplicated characters over a sustained interactive session.
Success criteria
All typed characters are echoed back correctly with no drops, corruption, or noticeable lag (<100ms) over a sustained interactive session of at least 30 seconds.
How it is verified
Open a serial terminal at the configured baud rate, type a sequence of characters, and confirm each is echoed back immediately and correctly. Test with both short bursts and sustained typing to rule out buffer overruns or dropped characters.