2023-08-01 UARTS on Raspberry Pis. (This is not about the Pico microcontroller: that has its UART0 on pins 0(Tx) & 1(Rx). The only hassle with it was getting the UART to be used at all instead of the USB. ) There was some trouble with getting the Raspberry Pi Zero W listening: mainly about settings and pins. From https://github.com/raspberrypi/documentation/blob/develop/documentation/asciidoc/computers/configuration/uart.adoc it's clearly rather varied. On many Raspberry Pi boards (but not e.g. ComputeModule-4 which has more...) there are 2 UARTS, of which one is a 'PL011' and the other a less capable 'mini UART'. On most boards the PLO11 is the primary, but on the ZeroW/2W boards (and RPi 3) the mini is by default the primary and the PL011 is the secondary, connected in some way to the bluetooth. The bluetooth use can be turned off - see below. We, of course, have the Zero W... Some distinctions of PL011 / MiniUART: Mini-UART has smaller FIFOs; combined with the lack of flow control, this makes it more prone to losing characters at higher baudrates; it is also generally less capable than a PL011, mainly due to its baud rate link to the VPU clock speed. Mini-UART has no: break detection, framing errors detection, parity bit, receive timeout interrupt. The 'primary UART' on the Raspberry Pi is the one selected to be present on GPIO 14 (transmit) and 15 (receive). By default, this will also be the UART on which a Linux console may be present. The tty* device files have fixed names for the PL011 vs MiniUART: /dev/ttyAMA0 first PL011 (UART0) /dev/ttyS0 mini UART There are also serial* aliases showing which is currently primary and which secondary: /dev/serial0 primary UART /dev/serial1 secondary UART Baudrate defaults to 115200bps. If not caring about bluetooth, the RPi3 and RPiZW can have the PL011 set as the primary, to give the same setup as the other RPi models. In order to use the UART for communicating (rather than login) the console over serial should not be enabled: it's a setting in raspi-config (Interface Options, Serial Port [sic]); not sure whether it does anything other than a setting in /boot/config.txt In /boot/config.txt * the bluetooth connection of the PL011 in the ZeroW/2W can be prevented by dtoverlay=disable-bt * uart should be enabled enable_uart=1 Then pins 14 and 15 of the Pi Zero W are connected to the PL011 UART, linked from /dev/serial0.