sekigon-gonnoc / Pico-PIO-USB

USB host/device implementation using PIO of raspberry pi pico (RP2040).
MIT License
1.36k stars 145 forks source link

[QUESTION] Is it possible to use Pico-PIO-USB but mux the pins to the USB Phy microUSB connector? #106

Open shreeve opened 11 months ago

shreeve commented 11 months ago

The Pico's have a built in USB Phy and a microUSB connector, along with internal logic for handling the USB communications. However, Pico-PIO-USB is so cool, that it would be nice to be able to use it's logic (and the ability to control what it's doing more easily) instead of the USB Phy built in to the Pico.

Based on the Errata 5 workaround for a hardware issue with the Pico's, I can see that they are muxing the DP/DM pins to solve an issue with the hardware. Thus, it looks possible to re-map the DM/DP pins on to the physical connector and bypass the built-in, hardware based, native USB Phy and have it effectively "replaced" with a pure Pico-PIO-USB version.

Is this possible??? If not, I'm stuck having to solder or otherwise connect to different GPIO pins on each board that we prepare and send out to the field. If we could "commandeer" and take over the microUSB connector on the Pico, but drive it with Pico-PIO-USB, then I wouldn't have to do any soldering or otherwise connecting up wires, etc. and it would be awesome. :-)

Thoughts?

shreeve commented 11 months ago

@hathach or @sekigon-gonnoc - Do you know if this is possible?

hathach commented 10 months ago

@shreeve No I don't think it is possible to mux different DM/DP pin. The usb_muxing is refering to using different PHY but still using the same pins, much like switching the web back-end from azure to aws (phy), while the front-end (dm/dp pin) is still the same.

If muxing is required, you can use addtional muxing IC e.g https://www.adafruit.com/product/5871

image

fl-kmarston commented 1 month ago

@shreeve I think you might be doing what I want to do - I want to connect to some devices that have USB PL230 or USB CP210x UARTS. I want a box with a pico and a USB A that I can connect to via Bluetooth or WiFi and be able to use the serial console of the devices - this then means a phone can access configuration menus running on the single board computers that have the USB UARTS