I have tried to run the example files for "USB DEVICE" like usb_serial_device and usb_console on ESP32-S2FH4. I flashed the code and connected the device to my PC. I got an error "CODE 43 : DEVICE DESCRIPTOR REQUEST FAILED". I tried with multiple PCs, with multiple ESP32-S2FH4 boards and with multiple USB cables. The issue remains the same. I went in depth into the example files and there was a task that logs the "event-id" of the USB.
Event id is 1 in case of new USB connection, 6 in case PC sends data to the device, 7 if data from the ESP chip is transmitted. What I observed from the logs is that event id is continuously remaining "1" even after connection has been made and not switching to "6". This is a clear indication that ESP is not taking the request sent by PC. How can I resolve this?
Below is the link of the examples projects I used:
https://github.com/espressif/esp-idf/tr ... usb/device
USB issue on ESP32S2 MINI1 (ESP32-S2FH4)
-
- Posts: 9719
- Joined: Thu Nov 26, 2015 4:08 am
Re: USB issue on ESP32S2 MINI1 (ESP32-S2FH4)
How do you connect the boards to the PC; are you sure you don't have D+/D- reversed? If you want to know if this is a software or hardware issue: if you force the ESP into download mode (by pulling IO0 low during reset) the ROM should make the device show up as a valid USB device independent of what software is loaded.
-
- Posts: 6
- Joined: Fri May 13, 2022 9:23 am
Re: USB issue on ESP32S2 MINI1 (ESP32-S2FH4)
Thanks for the reply! We soldered the usb wires to the dev-board and connected it to the PC. I cross checked the wires, and D+,D- are connected well. I performed the test you said in which I made the device to go into boot/program mode. My device manager on my pc got reset and it could not identify the device i.e, it showed the same error "Device descriptor request failed". So do you think this is a hardware issue?
-
- Posts: 9719
- Joined: Thu Nov 26, 2015 4:08 am
Re: USB issue on ESP32S2 MINI1 (ESP32-S2FH4)
Unless you did something with eFuses, that indicates it's a hardware issue indeed.
Re: USB issue on ESP32S2 MINI1 (ESP32-S2FH4)
Can you provide schematics if it's a custom board?
Do you have any cap on d+/- lines?
-- john
Do you have any cap on d+/- lines?
-- john
-
- Posts: 6
- Joined: Fri May 13, 2022 9:23 am
Re: USB issue on ESP32S2 MINI1 (ESP32-S2FH4)
Thanq so much for your replies guys! The issue is resolved. On our PCB, we added resistors( zero ohms) and capacitors on the D+, D- lines as suggested by espressif. But, we are using esp32s2 controller and NOT soc. This leaves all our resistors and capacitors(maybe) prone to external noise,thus resulting in the malfunctioning of USB. Removing these resistors and capacitors on D+,D- lines and making a direction connection resolved the issue. USB is working fine now!
-
- Posts: 9719
- Joined: Thu Nov 26, 2015 4:08 am
Re: USB issue on ESP32S2 MINI1 (ESP32-S2FH4)
Hint for next time: if you checked the devboard schematics and saw the resistors and caps there, they were likely marked 'NC' and possibly also had their value greyed out. This means that there's a location for them on the devboard (for various purposes) but the device itself is not populated on the final board. If you copy a schematic, better to leave those components out as well.
Re: USB issue on ESP32S2 MINI1 (ESP32-S2FH4)
Good it's been resolved. I suspected you had caps on the data lines that caused this (perhaps in the nF/uF range instead of pF).Lalith1011 wrote: ↑Mon Aug 29, 2022 10:52 amThanq so much for your replies guys! The issue is resolved. On our PCB, we added resistors( zero ohms) and capacitors on the D+, D- lines as suggested by espressif. But, we are using esp32s2 controller and NOT soc. This leaves all our resistors and capacitors(maybe) prone to external noise,thus resulting in the malfunctioning of USB. Removing these resistors and capacitors on D+,D- lines and making a direction connection resolved the issue. USB is working fine now!
-- john
Who is online
Users browsing this forum: No registered users and 83 guests