Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

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

    MR Series
    5
    8
    2880
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dianjixz LV 4 last edited by

      将 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";
      };
      
      1 Reply Last reply Reply Quote Share 0
      • M
        memory LV 7 last edited by

        感觉和芯片的内部实现有关系,要测试才知道行不行。

        1 Reply Last reply Reply Quote Share 0
        • whycan
          whycan晕哥 LV 9 last edited by

          f2a3b8da-a536-41c8-bee5-dc6b3cca56ec-image.png

          PC1 没有 uart 复用,更没有 uart2 复用。

          A 1 Reply Last reply Reply Quote Share 0
          • A
            李思琦 LV 2 @whycan last edited by

            @whycan 这么说,功能不能任意指定管脚了?

            whycan 1 Reply Last reply Reply Quote Share 0
            • whycan
              whycan晕哥 LV 9 @alienwalker last edited by

              @alienwalker
              如果规格书没有写该引脚有某复用,那就是没有这个功能。也可以用io模拟实现,但是效果不太好。

              1 Reply Last reply Reply Quote Share 0
              • D
                dianjixz LV 4 last edited by

                事实上,我这样成功了,它确实可以这样用,

                whycan 1 Reply Last reply Reply Quote Share 0
                • whycan
                  whycan晕哥 LV 9 @dianjixz last edited by

                  @dianjixz

                  不好意思,眼拙没看清楚, PC1 有 uart2 复用,如果测试能用,说明硬件实现是单刀单掷的。

                  1 Reply Last reply Reply Quote Share 0
                  • E
                    elliott LV 4 last edited by

                    uart2串口通信请问下目前正常了吗?

                    1 Reply Last reply Reply Quote Share 0
                    • 1 / 1
                    • First post
                      Last post

                    Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

                    行为准则 | 用户协议 | 隐私权政策