Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shreeve opened this issue Dec 19, 2023 · 8 comments

Comments

@shreeve
Copy link

shreeve commented Dec 19, 2023

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
Copy link
Author

shreeve commented Dec 22, 2023

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

@hathach
Copy link
Contributor

hathach commented Jan 9, 2024

@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
Copy link

@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

@shreeve
Copy link
Author

shreeve commented Nov 30, 2024

@sekigon-gonnoc / @hathach / @kilograham - Is it now possible with the rp2350 to mux GPIO pins (here controlled by Pico-PIO-USB) to the USB Phy connector?

@hathach
Copy link
Contributor

hathach commented Dec 5, 2024

@shreeve the simple anwser is No. The muxing make it posssible to use DM/DP as general GPIO, but the other way is not possible i.e assign other GPIO to USB PHY. That is because I think they require additional/dedicated analog/filter/logic/gate attached to the pins to get it right. Most vendor will jusst locked that to a few selected pins where you can switch, for pico dm/dp is the only pins

To sum up you can use DP/DM as GPIO and can possible use pio-usb with it. But you cannot connect other GPIO to the USBPHY.

image

@shreeve
Copy link
Author

shreeve commented Dec 5, 2024

@hathach - Thank you Ha!

@shreeve
Copy link
Author

shreeve commented Dec 5, 2024

@hathach - Just to clarify, then ... when it says "Use the usb DP and DM pins as GPIO pins instead of connecting them to the USB controller", doesn't this mean that the DP and DM pins inside the USB Phy can act as GPIO pins? If they can act as GPIO pins, can we not read from and write to them like GPIO pins?

@hathach
Copy link
Contributor

hathach commented Dec 5, 2024

I think when using DM/DP as GPIO, you can turn it on/off and read its value like othe normal GPIO. But it is disconnected from USBPHY making USBHY not acccessible.

              USBPPHY
        mux  /
DM/DP <-----
            \
              GPIO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants