Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Rockpi4/dev/use-uart2-as-application-uart

< Rockpi4‎ | dev
Revision as of 07:56, 21 August 2023 by RadxaYuntian (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
    ROCK Pi 4 >  Development >  Use UART2 as Application UART

OUTDATED

The content below is out of date. User should use rsetup to enable UART overlay instead.

The original content is kept for historical purpose.

Description

If you want to use uart with Kernel > 5.10 in ROCK Pi 4. You can follow these steps.

Install essential package

 sudo apt-get install -y rockpi4-dtbo

UART

Modify file /boot/hw_intfc.conf. Set "on" to enable the optional hardware interfaces while set "off" to disable.

 intfc:uart2=on
 intfc:uart4=on

And add "#" to line "intfc:dtoverlay=console-on-ttyS2"

 #intfc:dtoverlay=console-on-ttyS2
 #intfc:dtoverlay=console-on-ttyS4

by now, the uart2 can still be used as a debug port with system log. If you don't want to output kernel messages, you can disable it as follow.

Modify file /boot/extlinux/extlinux.conf.

 append earlyprintk console=ttyFIQ0,1500000n8 rw init=/sbin/init rootfstype=ext4 rootwait  root=UUID=8650cdca-49b0-4431-9667-5c639f6bab89 console=ttyS2,1500000n8

Delete strings console=ttyFIQ0,1500000n8 and console=ttyS2,1500000n8 in this line.

 append earlyprintk rw init=/sbin/init rootfstype=ext4 rootwait  root=UUID=8650cdca-49b0-4431-9667-5c639f6bab89