espusb icon indicating copy to clipboard operation
espusb copied to clipboard

GPIO pair for D- and D+

Open mikewen opened this issue 9 years ago • 10 comments

Can you explain a bit on 'any GPIO pair may be used. It is important to note that both D- and D+ MUST be adjacent.' ?

Is it means GPIO12 and GPIO13 (D-, D+) will work, but GPIO12 and GPIO14 (D-, D+) won't ?

Why is that?

Thanks a lot! This is great project!

mikewen avatar Oct 02 '16 14:10 mikewen

Correct!

That is because I mask off both bits using the extui command, so, you can't select the bits separately. Admittedly at this point, for low-speed only, this could be re-worked... but that's how it's setup now.

cnlohr avatar Oct 03 '16 04:10 cnlohr

Hey where can i change the usb pins in the source code? i want to use rxd and txd with an esp-01 module

atc1441 avatar Feb 23 '17 18:02 atc1441

That would be in usb_config.h I think.

T-vK avatar Feb 23 '17 19:02 T-vK

I was loking there and there is this define: PERIPHS_IO_MUX_GPIO5_U and FUNC_GPIO4 if i change this to 3 or 1 witch is the rxd and txd, it shows me errors

atc1441 avatar Feb 23 '17 19:02 atc1441

I don't know. Try PERIPHS_IO_MUX_U0RXD_U, PERIPHS_IO_MUX_U0TXD_U, FUNC_GPIO3 and FUNC_GPIO1.

T-vK avatar Feb 23 '17 19:02 T-vK

Thank you it did compile now. But did not work for me i will try it with adjacent pins like gpio2 or gpio0 maybe it will not disturb the esp bootloader

atc1441 avatar Feb 23 '17 19:02 atc1441

i did it now with the original pins gpio 4 and 5 see here: http://atcnetz.blogspot.de/

it work great as a mini usb stick :)

thank you cnlohr and T-vK

atc1441 avatar Feb 24 '17 17:02 atc1441

Spectacular.

In retrospect, I could have engineered it in such a way that it would not require adjacent pins. I wish I had done that, but that ship has sailed :(

cnlohr avatar Feb 24 '17 21:02 cnlohr

Do you know if we can use the GPIO0/1/2 pins? They are used to enter bootloader mode etc. They must not be pulled low at the time of power on.

I am not trying to nitpick. I have a few tiny ESP-01 modules that only have GPIO0..3 exposed as pins on the header.

anishsane avatar Aug 06 '24 17:08 anishsane

I honestly don't know. I am unaware of any issues. Give it a shot and report back?

cnlohr avatar Aug 15 '24 06:08 cnlohr