

全志芯片Tina Linux 修改 UART 引脚、UART端口 (2)
source link: https://blog.51cto.com/u_15380233/5815815
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

全志芯片Tina Linux 修改 UART 引脚、UART端口 (2)
精选 原创场景二:使用UART3,需要从UART0改为UART3(PB6,PB7)
- 修改
sys_config.fex
(BOOT0与Uboot的串口)
sys_config.fex
的路径是 device/config/chips/t113/configs/evb1/sys_config.fex
中的 uart_debug_port
[uart_para]
uart_debug_port = 0
uart_debug_tx = port:PF02<3><1><default><default>
uart_debug_rx = port:PF04<3><1><default><default>
[uart_para]
uart_debug_port = 3
uart_debug_tx = port:PB06<7><1><default><default>
uart_debug_rx = port:PB07<7><1><default><default>
- 修改设备树(Linux使用的串口输出)
路径:device/config/chips/t113/configs/evb1/board.dts
uart3_pins_a: uart3_pins@0 {
pins = "PC6", "PC7";
function = "uart0";
drive-strength = <10>;
allwinner,muxsel = <4>;
bias-pull-up;
};
uart3_pins_b: uart3_pins@1 {
pins = "PC6", "PC7";
function = "gpio_in";
};
&uart0 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&uart0_pins_a>;
pinctrl-1 = <&uart0_pins_b>;
status = "okay";
};
&uart3 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&uart3_pins_a>;
pinctrl-1 = <&uart3_pins_b>;
status = "disabled";
};
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";
};
&uart0 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&uart0_pins_a>;
pinctrl-1 = <&uart0_pins_b>;
status = "disabled"; # 关闭UART0
};
&uart3 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&uart3_pins_a>;
pinctrl-1 = <&uart3_pins_b>;
status = "okay"; # 开启UART3
};
- 修改UBOOT CONSOLE INDEX
路径:brandy/brandy-2.0/u-boot-2018/configs/sun8iw20p1_defconfig
增加下列内容
CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_CONS_INDEX=4 # UART 3+1 = 4
- 修改启动bootargs
路径:device/config/chips/t113/configs/evb1/env.cfg
earlyprintk=sunxi-uart,0x02500000
initcall_debug=0
console=ttyS0,115200
修改后earlyprintk=sunxi-uart,0x02500000
需要修改为 UART3 的地址,查阅手册可知为 0x02500C00

earlyprintk=sunxi-uart,0x02500C00
initcall_debug=0
console=ttyS3,115200
注意 ARM 平台还需要设置Kernel,如下:
make kernel_menuconfig
找到 Kernel low-level debugging functions,修改寄存器地址

RISC-V 不需要此操作
- 赞
- 收藏
- 评论
- 分享
- 举报
Recommend
-
9
The team at Tina is dedicated to revolutionizing the CMS space. We were the first to offer contextual editing in real-time which enabled teams to be more productive. Now we are introducing the world’s first UI editor for MDX. This empowers co...
-
5
Tina Summerford: Why the story of Xbox is so compelling 20 years later Join gaming leaders, alongside GamesBeat and Facebook Gaming, for their 2nd Annual GamesBeat & Facebook Gaming Summit | GamesBeat: Into the Metaverse...
-
5
On Tina Continuing my foray into the world of Static Site Generators (SSGs), this time I decided to try out one that's quite different: Ti...
-
9
Linux VPS 服务器 SSH 端口一键修改脚本 Moexin 2020-04-10 i...
-
8
ssh Linux SSH 端口修改 默认情况下,SSH监听端口22。更改默认SSH端口可降低自动攻击的风险,从而为服务器增加一层安全保护
-
6
存储切换方法 SDK切换存储介质需要修改board.dts、sys_config.fex、内核配置、TINA系统配置。另外,在spinor 存储介质下,通过 u-boot-sun8iw21p1.bin 进行烧录,u-boot-spinor-sun8iw21p1.bin 启动,使用
-
7
LM1117是一个低压差电压调节器系列。其压差在1.2V输出,负载电流为800mA时为1.2V。它与国家半导体的工业标准器件LM317有相同的管脚排列。LM1117有可调电压的版本,通过2个外部电阻可实现1.25~13.8V输出电压范围。另外还有5个固定电压输出(1.8V、2.5V、2.85V、3.3V...
-
11
LM2576系列是美国国家半导体公司生产的3A电流输出降压开关型集成稳压电路,它内含固定频率振荡器(52kHz)和基准稳压器(1.23V),并具 有完善的保护电路,包括电流限制及热关断电路等,利用该器件只需极少的外围器件便可构成高效稳压电路。接下来,详细为你说下LM2576芯...
-
5
CC2530 是用于2.4-GHz IEEE 802.15.4、ZigBee 和RF4CE 应用的一个真正的片上系统(SoC)解决方案。它能够以非常低的总的材料成本建立强大的网络节点。接下来,详细为你说下CC2530芯片有几个引脚 CC2530和ZIGBEE的关系 1.CC2530芯片有几个引脚...
-
9
ssh 如何在 Linux 修改 SSH 服务端口 SSH 是一种网络协议,用于与 Linux 系统进行远程安全通信。默认情况下,SSH 服务使用端口 22 ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK