How can I access non-REPL UART over USB?
So I'm using the RP2 port of MicroPython.
Is there a way to, at runtime, switch to EG UART1 communication? By default I get the Python REPL, which is fine but I'm trying to expose UART1, with all its relevant programming, over the USB connection. Ideally would avoid the hardware pin-connected adapter if at all possible.
I can see USB_VCP [0] is a thing, but it's only for PyBoard. CircuitPython [1] for example allows defining another virtual USB device, and mapping it to UART from what I can tell. There is also a community patch that does just this, but it's a git patch and possibly leads to other issues [2].
[0] https://docs.micropython.org/en/latest/library/pyb.USB_VCP.html
[1] https://learn.adafruit.com/customizing-usb-devices-in-circuitpython?view=all#add-a-second-serial-port-3096573-2
[2] https://forums.raspberrypi.com/viewtopic.php?t=305834
REPL over UART not working on the RP2 port
I’m trying to run a clean micropython port for the rp2 using a picoprobe as a debugger but I’m unable to use the REPL over UART functionality.
-
The only modification from a clean micropiton checkout is that i enabled MICROPY_HW_ENABLE_UART_REPL in the mpconfigport.h
-
The REPL over UART sems to immediately crash after startup since its not responding after it has send its startup information.
-
When using rshell its getting stuck at "Retrieving sysname ..."
<img width="527" alt="image" src="https://user-images.githubusercontent.com/43995448/225936708-b42afc37-2a1f-40c3-9c28-a0e24cea6c1a.png"> -
Using a terminal like minicom I can see the startup message but I’m unable to get any future response from the rp2.
<img width="545" alt="image" src="https://user-images.githubusercontent.com/43995448/225937347-91add04a-aa3f-476e-a506-162e03c93ac9.png">