Beruflich Dokumente
Kultur Dokumente
The raspberry pi has a UART interface, with which it can send debug information to a seri-
al console. As a basic step of Embedded Linux Development, let’s see the procedure to
connect the Raspberry Pi UART to a computer.
Linux porting is a di!cult task. We can’t simply boot a Linux board by building u-boot, ker-
nel, and root "le system images. This type of approach never works. It will end up with
several issues like kernel panics, device driver issues, device tree issues, bootloader is-
sues, etc…
So to debug entire system, we need an interface that can send debug information from
Linux hardware (raspberry pi) to a computer. There are three possible ways
1. Network
2. Video
3. UART
Network and Video interfaces are not so popular in terms of system debugging. They
need special hardware and initializations. Much custom Linux hardware doesn’t come
with and video and network interface. In fact, network and video interface are not avail-
able during "rst a bootloader stage.
But UART is considered to be a basic peripheral for all SOCs. UART does not require any
special hardware. Transmitter (Tx) and receiver (Rx) lines are enough to debug entire sys-
tem.
For any board, "rst of all you need to "nd the ‘tx’ and ‘rx’ lines of the UART. For this, you
need board schematics. Download raspberry pi schematics from the above link.
For raspberry, UART ‘tx’ and ‘rx’ pins are available on GPIO header (J8 connector). Refer
“GPIO EXPANSION“ section in the schematics.
On GPIO header, pin-8 and pin-10 are UART ‘tx’ and ‘rx’ pins.
PIN8 – TXD
PIN9 – RXD
Raspberry Pi board ‘tx’, ‘rx’ pin identi"cation has shown below. You can use PIN6 as com-
mon ground between raspberry Pi and a computer.
RPi UART to a computer
You can connect Raspberry pi to a computer using a USB to UART converter. In fact, it is the easiest way and
also less risk involved.
Note that, the TTL logic levels of Broadcom SOC are Logic0-0v and Logic1-3.3v. So, before
purchasing a USB to UART converter, make sure that it supports UART with 3.3v TTL logic
levels.
Required hardware:
If you have a USB to UART converter with 3v3 TTL logic levels, then connections are as
simple as shown below.
TXD and RXD pins of the USB to UART converter and Raspberry Pi should connect as
shown below.
Warning: If you have a USB to UART converter with 5V TTL logic levels, then don’t dare to connect to raspberry
Pi. It de"antly damages your pi’s UART controller. In such cases, better buy a Logic Level Converter that con-
verts 3.3V to 5V, vice versa.
You can purchase max3232 PCB online. You can also design your own MAX3232 board us-
ing below links.
In datasheet, refer 10.2 section for circuit diagram. as per data sheet, For 3.3v Vcc, use
100nF (0.1 uF) capacitors.
Thanks