您尚未登录。

楼主 # 2022-02-15 10:23:55

dianjixz
会员
注册时间: 2021-09-16
已发帖子: 9
积分: 13

D1 uart2功能可以用在PD1和PC1引脚上吗?

将 D1 的 PD1&PC1 引脚设定为串口复用功能,但是串口通信不成功,请问这是什么情况?
下面是设备树配置

	uart2_pins_a: uart2_pins@0 {  /* For EVB1 board */
		// pins = "PC0", "PC1";
		pins = "PD1";
		function = "uart2";
		drive-strength = <10>;
		bias-pull-up;
	};
	uart2_pins_b: uart2_pins@1 {  /* For EVB1 board */
		// pins = "PC0", "PC1";
		pins = "PC1";
		function = "uart2";
		drive-strength = <10>;
		bias-pull-up;
	};
	uart2_pins_c: uart2_pins@2 {  /* For EVB1 board */
		// pins = "PC0", "PC1";
		pins = "PD1", "PC1";
		function = "gpio_in";
	};


&uart2 {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&uart2_pins_a &uart2_pins_b>;
	pinctrl-1 = <&uart2_pins_c>;
	uart2_type = <2>;
	status = "okay";
};

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn