• Recent
    • Docs
    • Github
    • 百度网盘
    • Onedrive
    • Official
    • Shop
    • Register
    • Login

    CoolPi 4B硬件扩展二:Serial port

    Scheduled Pinned Locked Moved Hardware
    18 Posts 8 Posters 5.4k Views
    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
      dreamer
      last edited by

      It seems that the DTB file has changed a lot in the 20.04 ubuntu image. I can only find uart3-m1-xfer instead of the needed uart3-m2-xfer in DTS file converted from rk3588s-cp4.dtb. What should I do in order to use uart3 under this circumstance?

      		uart2 {
      
      			uart2m0-xfer {
      				rockchip,pins = <0x00 0x0e 0x0a 0x167 0x00 0x0d 0x0a 0x167>;
      				phandle = <0x136>;
      			};
      		};
      
      		uart3 {
      
      			uart3m1-xfer {
      				rockchip,pins = <0x03 0x0e 0x0a 0x167 0x03 0x0d 0x0a 0x167>;
      				phandle = <0x137>;
      			};
      		};
      
      		uart4 {
      
      			uart4m1-xfer {
      				rockchip,pins = <0x03 0x18 0x0a 0x167 0x03 0x19 0x0a 0x167>;
      				phandle = <0x138>;
      			};
      		};
      
      		uart5 {
      
      			uart5m1-xfer {
      				rockchip,pins = <0x03 0x15 0x0a 0x167 0x03 0x14 0x0a 0x167>;
      				phandle = <0x139>;
      			};
      		};
      
      大法师大 1 Reply Last reply Reply Quote 0
      • 大法师大
        大法师 @dreamer
        last edited by

        @dreamer
        657ddc8d-1873-4540-8872-cf8d5a22a1da-1673939130990.png

        uart2 node is used for console and uart9 node is used for bluetooth.

        jack@cool-pi.com

        D 1 Reply Last reply Reply Quote 0
        • D
          dreamer @大法师
          last edited by

          @大法师 Many thanks for your reply, but unoccupied serial ports accessible from GPIOs include uart3,6. There left only uart6 if uart3 can't be functional. Is it possible to activate uart3-m2-xfer?
          1affb7dc-1400-4c8c-8684-7d23e5bb2de3-image.png

          1 Reply Last reply Reply Quote 0
          • A
            AugustRobot_Zou
            last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • A
              AugustRobot_Zou
              last edited by AugustRobot_Zou

              有办法把console关闭吗?使用uart2-ttyS0作为一路普通串口

              G 1 Reply Last reply Reply Quote 0
              • G
                george @AugustRobot_Zou
                last edited by

                @AugustRobot_Zou
                可以,但是比较麻烦,需要改loader uboot kernel,现在扩展口上面串口不够用吗?

                A S 2 Replies Last reply Reply Quote 0
                • A
                  AugustRobot_Zou @george
                  last edited by

                  @george 目前是刚好够用的,我以为跟其他串口一样改一下内核设备树就能多一个备用串口,如果太麻烦就算了暂时不用,别引出其他bug了。

                  大法师大 1 Reply Last reply Reply Quote 0
                  • 大法师大
                    大法师 @AugustRobot_Zou
                    last edited by

                    @AugustRobot_Zou 如果不介意开机启动阶段的一些串口输出,可以直接修改配置参数,把ttyS0当做普通串口使用。

                    /boot/firmware/extlinux/extlinux.conf

                    console=ttyS0,115200
                    改为
                    console=tty0
                    

                    jack@cool-pi.com

                    S 1 Reply Last reply Reply Quote 0
                    • 阿
                      阿里
                      last edited by

                      板上I/O口的对应哪个呀,都没标注出来

                      阿 1 Reply Last reply Reply Quote 0
                      • 阿
                        阿里 @阿里
                        last edited by

                        系统上显示的为0,1,2

                        G 1 Reply Last reply Reply Quote 0
                        • G
                          george @阿里
                          last edited by

                          @阿里
                          wiki上有原理图和PCB也有标识第一脚位置,数一下就可以确定了。

                          1 Reply Last reply Reply Quote 0
                          • 银
                            银河铁道
                            last edited by

                            请问一下,我这边看完了wiki,我目前理解是,如果从网盘中下载下来的镜像,仅开启了uart2、9、6。其中uart2也就是ttyS0作为debug口。uart9也就是ttyS1和uart6也就是ttyS2作为普通串口。

                            但是我有如下问题:

                            1. 我没有找到uart9(ttyS1)对应的外部引脚,从电路图上看似乎是用来做蓝牙的串口了?
                            2. 如果我希望不改动debug口的情况下,引脚上有至少两个可用串口,是否我需要重写dts,然后重编内核,再打包镜像?我对bsp不太熟,希望大佬指导一下。
                            G J 2 Replies Last reply Reply Quote 0
                            • G
                              george @银河铁道
                              last edited by

                              @银河铁道
                              修改DTS配置,然后把编译生成的dtb文件拷贝到boot分区重启即可。

                              1 Reply Last reply Reply Quote 0
                              • J
                                jack_admin @银河铁道
                                last edited by

                                @银河铁道 said in CoolPi 4B硬件扩展二:Serial port:

                                请问一下,我这边看完了wiki,我目前理解是,如果从网盘中下载下来的镜像,仅开启了uart2、9、6。其中uart2也就是ttyS0作为debug口。uart9也就是ttyS1和uart6也就是ttyS2作为普通串口。

                                但是我有如下问题:

                                1. 我没有找到uart9(ttyS1)对应的外部引脚,从电路图上看似乎是用来做蓝牙的串口了?
                                2. 如果我希望不改动debug口的情况下,引脚上有至少两个可用串口,是否我需要重写dts,然后重编内核,再打包镜像?我对bsp不太熟,希望大佬指导一下。

                                ttyS1用作蓝牙通信

                                1 Reply Last reply Reply Quote 0
                                • S
                                  santu @george
                                  last edited by

                                  @george 请问有相关教程可以参考吗?

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    santu @大法师
                                    last edited by

                                    @大法师 改完之后重启,会生效。但是重新上电就又不行了,还得带电重启一次 请问这可能是怎么造成的呢

                                    G 1 Reply Last reply Reply Quote 0
                                    • G
                                      george @santu
                                      last edited by

                                      @santu
                                      重启和重新上电以后运行如下命令发出来

                                      ls /dev/ttyS*
                                      
                                      1 Reply Last reply Reply Quote 0
                                      • 1 / 1
                                      • First post
                                        Last post