Tina修改串口
发表于:2023-06-14 |

修改Tina Linux的调试串口

从串口0修改到串口3

需要修改

  • 修改env.cfg文件
1
device/config/chips/**/configs/***/env.cfg
1
2
3
4
5
- earlyprintk=sunxi-uart,0x02500000
- console=ttyS0,115200

+ earlyprintk=sun02i-uart,0x0250C000 #为该串口的开始物理地址
+ console=ttyS3,115200
  • 修改sys_config.fex(BOOT0与Uboot的串口)
1
device/config/chips/**/configs/***/sys_config.fex
1
2
3
4
[uart_para]
uart_debug_port = 3
uart_debug_tx = port:PB06<复用功能序号><1><default><default>
uart_debug_rx = port:PB07<复用功能序号><1><default><default>
  • 修改设备树(Linux使用的串口输出)

    开启UART3,并关闭其他UART3所占用引脚的使能。

1
device/config/chips/**/configs/***/board.dts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
uart3_pins_a: uart3_pins@0 {
pins = "PB6", "PB7";
function = "uart0";
drive-strength = <10>;
allwinner,muxsel = <7>;
bias-pull-up;
};

uart3_pins_b: uart3_pins@1 {
pins = "PB6", "PB7";
function = "gpio_in";
};

... ...

&uart3 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&uart3_pins_a>;
pinctrl-1 = <&uart3_pins_b>;
status = "okay"; # 开启UART3
};
  • 修改启动登录参数(或改用其他文件系统
1
target/allwinner/***/base-files/etc/inittab

完成

上一篇:
BSP_USB调试
下一篇:
FBTFT st7789v