User Manual

Table Of Contents
118
UART is a more commonly used communication protocol between devices. Using UART, you can allow
MCUs such as Arduino, STM32, or ESP32 to communicate with the Raspberry Pi, which can make your robot
more powerful.
However, for some Raspberry Pis, the UART that is enabled by default is not a full-featured UART, so
you need to refer to the following steps to enable the full-featured UART. The following parts are from the
official documentation of the Raspberry Pi The Raspberry Pi UARTs.
The SoCs used on the Raspberry Pis have two built-in UARTs, a PL011 and a mini UART. They are
implemented using different hardware blocks, so they have slightly different characteristics. However, both are
3.3V devices, which means extra care must be taken when connecting up to an RS232 or other system that
utilises different voltage levels. An adapter must be used to convert the voltage levels between the two
protocols. Alternatively, 3.3V USB UART adapters can be purchased for very low prices.
By default, on Raspberry Pis equipped with the wireless/Bluetooth module (Raspberry Pi 3 and
Raspberry Pi Zero W), the PL011 UART is connected to the Bluetooth module, while the mini UART is used as
the primary UART and will have a Linux console on it. On all other models, the PL011 is used as the primary
UART.
In Linux device terms, by default, /dev/ttyS0 refers to the mini UART, and /dev/ttyAMA0 refers to the
PL011. The primary UART is the one assigned to the Linux console, which depends on the Raspberry Pi model
as described above. There are also symlinks:
/dev/serial0, which always refers to the primary UART (if enabled), and /dev/serial1, which similarly always
refers to the secondary UART (if enabled).
23 Enable UART