Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


Sidebar

products:sbc:common:applications:gpio:uart

This is an old revision of the document!


UART

Introduction

This document mainly introduces the usage of UART on 40-Pin Header.

UART Information

PWM PIN GPIO(#Number) DT Overlays Node Device Node
VIM1 PWM_AO_A 35 GPIOAO_3 (#504) pwm_ao_a /sys/class/pwm/pwmchip4
VIM2 PWM_D 35 GPIODV_28 (#478) pwm_d /sys/class/pwm/pwmchip1
VIM3/3L PWM_F 35 GPIOX_7 (#432) pwm_f /sys/class/pwm/pwmchip4
VIM4 PWM_F 35 GPIOY_8 (#482) pwm_f /sys/class/pwm/pwmchip4

Enable UART

Uart PIN in 40-Pin Header is PIN15 and PIN16. Refer to Device Tree Overlay.

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

overlays=uart4 pwm_ao_a pwm_f i2c0

Reboot to effect.

  • VIM1/VIM2/VIM4 - uar4
  • VIM3/VIM3L - uart3

Check UART Node

After reboot, you will see the uart device node.

  • VIM1/VIM2/VIM4 - /dev/ttyS4
  • VIM3/VIM3L - /dev/ttyS3
Last modified: 2022/07/12 22:51 by nick