There are currently 2 posts.
Font size: Small - 100% (Default)▼  Content converter: No conversion▼
 
Clicks Replies
645 1
rk3308开发板 linux调试串口改到UART2
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 1 Posted at: 12/29/25 16:27
UART2引脚:
UART2_TX_M0 GPIO1_C7
UART2_RX_M0 GPIO1_C6

创建一个debug_uart2.dtsi文件,内容如下:
/ {
    chosen {
        bootargs = "earlycon=uart8250,mmio32,0xff0e0000 console=ttyS2,115200n8 root=PARTUUID=614e0000-0000 rootwait snd_aloop.index=7 snd_aloop.use_raw_jiffies=1";
    };
};

&fiq_debugger {
    status = "disabled";
};

&uart2 {
    status = "okay";
};

然后在设备树文件Luckfox_Nova_SDK_250430/kernel/arch/arm64/boot/dts/rockchip/luckfox-rk3308b-evb-v10.dts末尾include这个debug_uart2.dtsi文件就可以了。
#include "../../../../../../../ominicyl_driver/debug_uart2.dtsi"

./build.sh,然后烧录。
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 2 Posted at: 12/29/25 16:28

uboot和linux内核初始化期间还是用的是UART4,波特率为150万。

linux内核启动后就改用UART2了,波特率为11万5千2。

Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.
(Shortcut key: Ctrl+Enter)
Post Information
Clicks: 645 Replies: 1
Author: 巨大八爪鱼
Last reply: 巨大八爪鱼
Last reply time: 12/29/25 16:28
Bar Hot Posts
Announcements