🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    UART0 (GPIO1,3) usage for RS485 and possible conflict with CP2104

    Modules
    2
    9
    17.7k
    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.
    • arzamanA
      arzaman
      last edited by

      Hi would like to use the COMMU module for RS485 interface in particular using the SP3485 tranceiver on UART 0 so GPIO 1 and 3 (M5 bus pin 13 and 14)

      0_1557829991509_4ce5a99c-28ed-4d77-bcbe-a7abdb8e1116-image.png

      Checking the M5stack basic core schematic seems same GPIO are used for communication with USB serial dirver CP2104

      0_1557830032014_329232a5-8a78-4d9d-ae65-56f466075baa-image.png

      Is there any possible conflict case ? can I use freely GPIO 1 & 3 on the bus or there is any constraints due to sharing with CP2104 ??

      thanks for any clarification

      Davide

      1 Reply Last reply Reply Quote 0
      • ajb2k3A
        ajb2k3
        last edited by

        I think there was an issue report by another forum member but they fixed it by wiring the unit to the other port.

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        arzamanA 1 Reply Last reply Reply Quote 0
        • arzamanA
          arzaman @ajb2k3
          last edited by

          @ajb2k3 Unluckily the use of UART2 is NOT an option in my custom circuit since GPIO 16&17 are already used by another device

          I think this is a "general" m5stack core problem: how can I use GPIO 1&3 routed on the bus if they are already in use by the CP2104 ??

          Especially GPIO3 that is an output od the USB to serial adapter
          two useless bus pin ?

          Davide

          1 Reply Last reply Reply Quote 0
          • ajb2k3A
            ajb2k3
            last edited by

            Hmn, that is an issue.
            I wonder if a UART switcher/multiplexer could be of use to you in this case.

            UIFlow, so easy an adult can learn it!
            If I don't know it, be patient!
            I've ether not learned it or am too drunk to remember it!
            Author of the WIP UIFlow Handbook!
            M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

            1 Reply Last reply Reply Quote 0
            • arzamanA
              arzaman
              last edited by

              also in my mind is an issue ...
              is possibile that 2 GPIO of the UART0 routed on the core bus are not usable at all ??

              Davide

              ajb2k3A 2 Replies Last reply Reply Quote 0
              • ajb2k3A
                ajb2k3 @arzaman
                last edited by

                @arzaman GPIO2 is on the bus connector pin 19.

                UIFlow, so easy an adult can learn it!
                If I don't know it, be patient!
                I've ether not learned it or am too drunk to remember it!
                Author of the WIP UIFlow Handbook!
                M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                arzamanA 1 Reply Last reply Reply Quote 0
                • arzamanA
                  arzaman @ajb2k3
                  last edited by

                  @ajb2k3 I was referring to GPIO 1 & 3 that can't be used...

                  1 Reply Last reply Reply Quote 0
                  • ajb2k3A
                    ajb2k3 @arzaman
                    last edited by

                    @arzaman said in UART0 (GPIO1,3) usage for RS485 and possible conflict with CP2104:

                    also in my mind is an issue ...
                    is possibile that 2 GPIO of the UART0 routed on the core bus are not usable at all ??

                    Davide

                    Sorry I missunderstood this comment.

                    UIFlow, so easy an adult can learn it!
                    If I don't know it, be patient!
                    I've ether not learned it or am too drunk to remember it!
                    Author of the WIP UIFlow Handbook!
                    M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                    1 Reply Last reply Reply Quote 0
                    • arzamanA
                      arzaman
                      last edited by

                      I share m5 support answer on the topic

                      "UART0 is a specifically assigned for log print, it is encapsulated by ESP32 at lower layer. It will print the system log automatically and seems like we users are not permitted to shut it down, so we don’t recommend users to use UART0 as a normal UART series port, it will interrupt you communication. That why we connect it with CP2104."

                      to me it's clear the usage of UART0 ..less cleare why this two GPIO are routed to the M5bus since can't be used

                      I will use UART2 for my custom project with this assignment GPIO34=RX GPIO17=TX

                      Davide

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