odroid-h3:application_note:uart

Pin# Pin Label dev node
8 UART0_RXD /dev/ttyS0
10 UART0_TXD
12 UART0_CTS#
14 UART0_RTS#
This examples have written based on under the Ubuntu 22.04 and Linux kernel 5.15.0-46-generic

Wire by crossing RX and TX pins.

Download fritzing
- Wiring part(H3) ☞ h3_uart_loopback.fzz
- ODROID-H3 part ☞ odroid-h3.fzpz

Wire pin #10(UART0_TXD) with pin #8(UART0_RXD).

Open two terminal windows

Press Ctrl + Alt + T

Install minicom util

sudo apt install minicom

Read and write characters

In one terminal, read from the ttyS0 with this command.

sudo minicom -D /dev/ttyS0

In the other terminal, write to the ttyS0 with this command.

echo "Hello World" > /dev/ttyS0

RTS (Request To Send): OUTPUT
CTS (Clear To Send): INPUT

The RTS pins operate as active low. If you set the RTS to HIGH, it is 0V, if you set it to LOW, it is 3.3V.

import serial
 
# '/dev/ttyS0'
uart = '/dev/ttyS0'
 
ser = serial.Serial(uart, 9600)
 
ser.setRTS(1)
import serial
 
# '/dev/ttyS0'
uart = '/dev/ttyS0'
 
ser = serial.Serial(uart, 9600)
 
ser.getCTS()

The Oscilloscope shows the RTS toggling speed. Its toggling frequency is around 43.5kHz

  • odroid-h3/application_note/uart.txt
  • Last modified: 2022/10/12 14:39
  • by luke.go