Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Cannot init 2 UARTs on GPy

    Scheduled Pinned Locked Moved GPy
    gpyuart
    4 Posts 3 Posters 632 Views 3 Watching
    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.
    • A Offline
      andrejpekarcik
      last edited by

      I am trying to initialize UART:

      uartGPS = UART(0, 9600)
      uartGPS.init(9600, bits=8, parity=None, stop=1, pins=('P3','P4'), timeout_chars=5)

      GPy gets frozen on these commands.

      uartGPS = UART(1, 9600)
      uartGPS.init(9600, bits=8, parity=None, stop=1, pins=('P3','P4'), timeout_chars=5)

      works well.

      I need for my projects two UARTs.

      robert-hhR 1 Reply Last reply Reply Quote 0
      • D Offline
        danielm
        last edited by

        I believe that bus 0 is used for REPL through serial connection in your case as well as this is an usual setup. Initializing new UART object on the same bus seems to stop terminal duplication (see os.dupterm() in docs). Try to connect to REPL via Telnet instead of serial connection.
        There is also bus 2 but according to the docs it is used for connection to LTE modem in case of GPy.

        1 Reply Last reply Reply Quote 1
        • robert-hhR Offline
          robert-hh @andrejpekarcik
          last edited by

          @andrejpekarcik UART0 is used for the REPL over USB. The regular speed is 115200. SO if you want to use that, you have to deinit REPL on UART, using uos.dupterm(None), and use Telnet for the REPL.

          1 Reply Last reply Reply Quote 0
          • A Offline
            andrejpekarcik
            last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom