ZYNQ UBOOT更换调试串口管脚的方法

15 篇文章 0 订阅
5 篇文章 0 订阅

ZYNQ UBOOT更换调试串口管脚的方法

问题的产生

本来我一直只用的zynq平台的调试串口是在uart1的mio48和mio49上,后来接了一个项目是别人家的硬件,我们做软件。看原理图发现串口被改到了uart0的mio15和mio14上了,开始没注意直接修改内核的设备树,烧录完uboot.bin后系统无任何打印,使用示波器测量发现TX管脚为高电平,说明uboot也要管脚更改。

修改过程

查看原始的uboot设备树中关于uart1的管脚定义为:
pinctrl_uart1_default: uart1-default {
mux {
groups = “uart1_10_grp”;
function = “uart1”;
};
conf {
groups = “uart1_10_grp”;
slew-rate = <0>;
io-standard = <1>;
};
conf-rx {
pins = “MIO49”;
bias-high-impedance;
};
conf-tx {
pins = “MIO48”;
bias-disable;
};
};

依照描述可见,uart1的第10组管脚就是mio48和mio49,在这里插入图片描述
参照上边的配置得到mio15和mio14的管脚配置如下:
pinctrl_uart0_default: uart0-default {
mux {
groups = “uart0_1_grp”;
function = “uart0”;
};
conf {
groups = “uart0_1_grp”;
slew-rate = <0>;
io-standard = <1>;
};
conf-rx {
pins = “MIO14”;
bias-high-impedance;
};
conf-tx {
pins = “MIO15”;
bias-disable;
};
};
在这里插入图片描述

验证

U-Boot 2016.01 (Jun 28 2020 - 17:36:23 +0800)

Model:
Board:
I2C: ready
DRAM: ECC disabled 512 MiB
MMC:
SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment

In: serial@e0000000
Out: serial@e0000000
Err: serial@e0000000
Model:
Board:
Net: ZYNQ GEM: e000b000, phyaddr 7, interface rgmii-id
eth0: ethernet@e000b000
Hit any key to stop autoboot: 0
Copying Linux from QSPI flash to RAM…
SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
device 0 offset 0x500000, size 0x3e0000
SF: 4063232 bytes @ 0x500000 Read: OK
device 0 offset 0x8e0000, size 0x20000
SF: 131072 bytes @ 0x8e0000 Read: OK
Copying ramdisk…
device 0 offset 0x900000, size 0xd00000
SF: 13631488 bytes @ 0x900000 Read: OK
Wrong Image Format for bootm command
ERROR: can’t get kernel image!

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值