|
发表于 2020-9-28 07:01:06
只看该作者
沙发
解决思路,串口配置正确,GPIO的gpio0_b3的功能配置检查:
文档 PX30 TRM-Part1 /Chapter 3 General Register Files (GRF) /P.g.104
Name Address Base
PMUGRF 0xFF010000
PMUGRF_GPIO0B_IOMUX 0x0004 W 0x00001000 GPIO0B iomux control bits
31:16 WO 0x0000
write_enable
When bit16=1, bit0 can be written by software.
...
When bit22=1, bit6 cannot be written by software;
When bit23=1, bit7 can be written by software.
7:6 RW 0x0
gpio0b3_sel
2'h0: gpio
2'h1: uart0_rx
2'h2: pmu_debug1
调试:
root@firefly:/home/firefly# io -4 -r 0xFF010004
ff010004: 00001015
-->bit7 = 0, 对应功能为gpio,没有使能uart0 rx
解决方法:
开机脚本 /etc/init.d/myboothack 添加
/usr/local/bin/io -4 -w 0xFF010004 0x00501055
0050 权限
005x tx/rx 功能
|
|