How To Use Uart

This documentation will introduce how to use the uart of 40PIN headers.

Check Uart Hardware PINs

Uart PIN in 40 PINs header is PIN15 and PIN16:

Enable Uart Node

Enable uart node via device tree overlays. Edit /boot/env.txt to add uartX to overlays.

e.g.

1
overlays=uart4 pwm_ao_a pwm_f i2c0
e.g.
  • VIM1/VIM2 - uar4
  • VIM3/VIM3L - uart3

Reboot to take effect.

Check the Uart Device Node

After reboot, you will see the uart device node.

e.g.
  • VIM1/VIM2 - /dev/ttyS4
  • VIM3/VIM3L - /dev/ttyS3