Cannot init 2 UARTs on GPy
-
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.
-
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. -
@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.
-
This post is deleted!
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