Page 1 of 2

ESP32-S3 DFU/Programming

Posted: Mon Nov 14, 2022 9:30 pm
by norwegian
Hello !
I'm having some difficulties trying to get the ESP32-S3-WROOM-1-N16R2 to connect to usb, on a custom made board
I have read the following guide:
https://docs.espressif.com/projects/esp ... s/dfu.html#

When i connect the esp via usb cable the device just connects and disconnects,
when i hold down IO0 and pulse reset, the connection is made but i get the follwing error in device manager:

Code: Select all

Windows has stopped this device because it has reported problems. (Code 43)
A request for the USB device descriptor failed. (Code 43)
i try to connect it with linux(debian) i get the following:

Code: Select all

device not responding to setup address 
device not accepting address 64, error -71
I have tried to pull IO09 to gnd, with no success, also i had some debouncing capasitor on reset switch and IO0, i have tried to remove them, also tried to remove the decoupling capacitors on USB_DP+ and USB_DN-
I've measured that there is connection to usb pins and IO19 and IO20
And there is no shorts to gnd, but what's strange is that i measure around 3V on USB_DP+ but i dont measure any voltages on USB_DP-
voltages are OK, tried with external power source and USB powered

Please see attached schematic:
Sheet1.pdf
(339.03 KiB) Downloaded 341 times

Re: ESP32-S3 DFU/Programming

Posted: Tue Nov 15, 2022 1:37 am
by ESP_Sprite
C7 and C9 should indeed not be installed. Aside from that, I don't really see an issue with your schematic... perhaps it's worth reading out the U0TXD pin to see what the bootup chatter looks like?

Re: ESP32-S3 DFU/Programming

Posted: Sun Nov 20, 2022 7:31 pm
by norwegian
When not in download mode i get:

Code: Select all

invalid header: 0xa5ff005a
While in download mode i get

Code: Select all

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x1 (DOWNLOAD(USB/UART0))
waiting for download
Still nothing happening on the USB port... when i try to connect to it. I dont have any way to debug the data on the USB bus.
Is there some special mode i need to initialize to use USB? i read about burning efuses but is this necessary?

Re: ESP32-S3 DFU/Programming

Posted: Mon Nov 21, 2022 9:14 am
by ESP_Sprite
That is 'proper' download mode indeed; unless you messed with its eFuses the ESP32S3 is more-or-less guaranteed to be a valid USB device at that point. That imo means that your issue is likely on the hardware side of things.

(Note you do need to burn eFuses to get DFU working, but if you do not do that you should see the internal USB-serial-JTAG device pop up as an USB serial port, and you're not seeing that, so better to debug that first.)

Just to check: when you plug the device into a Linux system, the kernel recognizes it as a *full*-speed device, not a *low*-speed one, right?

Re: ESP32-S3 DFU/Programming

Posted: Mon Nov 21, 2022 11:51 am
by norwegian
When i connect to linux, i only see the messages that i posted earlier, the device wont recognize. do you have any knowledge about needing pullup resistors on the usb data lines for the host computer to recognize it?

Re: ESP32-S3 DFU/Programming

Posted: Tue Nov 22, 2022 6:38 am
by ESP_Sprite
You tend to see more than that. Specifically, a message like:

Code: Select all

[717675.713172] usb 1-9: reset full-speed USB device number 86 using xhci_hcd
[725293.611802] usb 1-2: new full-speed USB device number 90 using xhci_hcd
which indicates if the device is detected as low- or full speed.

You don't need to add external pullups/pulldowns: the ESP32 has an internal one and the fact that your PC detects insertion of an USB device at all indicates that works.

Re: ESP32-S3 DFU/Programming

Posted: Tue Nov 22, 2022 7:41 am
by Mihalich
Why in your circuit not present 40 MHz resonator ?
As I see in DS:
"ESP32-S3 is unable to operate without an external main crystal clock."

Re: ESP32-S3 DFU/Programming

Posted: Wed Nov 23, 2022 7:00 am
by ESP_Sprite
Mihalich wrote:
Tue Nov 22, 2022 7:41 am
Why in your circuit not present 40 MHz resonator ?
As I see in DS:
"ESP32-S3 is unable to operate without an external main crystal clock."
Because OP is using a Wroom module, which has the crystal (and flash etc) already integrated.

Re: ESP32-S3 DFU/Programming

Posted: Wed Nov 23, 2022 9:31 am
by Mihalich
ESP_Sprite, how can author use two CAN if ESP32 only has one TWI module?

1 × TWAI® controller, compatible with ISO11898-1 (CAN Specification 2.0)

Re: ESP32-S3 DFU/Programming

Posted: Wed Nov 23, 2022 1:39 pm
by ESP_Sprite
Dunno. Possibly they switch the TWAI peripheral between GPIOs or something, but it's offtopic; that's not the question they asked. I'm also not sure why you're looking at me to answer questions on OPs design; it's not like I made it.