将 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";
};
离线