d1s 串口功能配置
-
串口配置,本例程以uart5为参考
1 【sys_config.fex】配置
配置文件参考https://tina.100ask.net/BasicComponent/Linux_Configuration_DevelopmentGuide-01;路径:\device\config\chips\d1s\configs\nezha\sys_config.fex ;---------------------------------------------------------------------------------- ;uart5 configuration ;uart5_used UART使用控制: 1 使用, 0 不用 ;uart5_port UART端口号 ;uart5_type UART类型,有效值为:2/4/8;表示2/4/8线模式 ;uart5_tx UART TX的GPIO配置 ;uart5_rx UART RX的GPIO配置 ;---------------------------------------------------------------------------------- [uart5] uart5_used = 1 uart5_port = 5 uart5_type = 2 uart5_tx = port:PB4<7><1><default><default> uart5_rx = port:PB5<7><1><default><default>
2 【linux-5.4\board.dts】配置
// 路径:\device\config\chips\d1s\configs\nezha\linux-5.4\board.dts uart5_pins_a: uart5_pins@0 { /* For awol nezha board */ pins = "PB4", "PB5"; function = "uart5"; muxsel = <3>; drive-strength = <10>; bias-pull-up; }; uart5_pins_b: uart5_pins@1 { /* For awol nezha board */ pins = "PB4", "PB5"; function = "gpio_in"; }; &uart5 { pinctrl-names = "default", "sleep"; pinctrl-0 = <&uart5_pins_a>; pinctrl-1 = <&uart5_pins_b>; status = "okay"; };
-
更正一下,
uart5_pins_a: uart5_pins@0 { /* For awol nezha board */ pins = "PB4", "PB5"; function = "uart5"; muxsel = <7>; drive-strength = <10>; bias-pull-up; };
-
@lingeasy 你这个配置的目的是干啥用的呀?
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号