Can't flash ESP32-S2 via USB-DFU: LIBUSB_ERROR_TIMEOUT
Posted: Wed Jul 12, 2023 9:06 am
I have an ESP32-S2-SOLO module on a custom PCB, with my USB data lines connected directly to the ESP32-S2 D+ and D- pins.
I can see the ESP32-S2 in the Device Manager (and its associated COM port) when the chip is booted in download mode, and I have the drivers installed (Windows 11). I can compile the code just fine using VS Code with ESP IDF (just the blink test program for now).
When I try to flash the chip via DFU, dfu-util seems to be able to detect and communicate with the device, but the download never goes past 0%, and then I get an error:
The full output is:
dfu-util can detect the device and list it:
So I don't think it's a bad PCB or anything like that: voltages, continuity on the data lines and everything are all as you'd expect.
This is my first time using the built-in USB controller rather than a USB-UART bridge.
Has anyone faced this problem before or does anyone know how it might be solved?
I can see the ESP32-S2 in the Device Manager (and its associated COM port) when the chip is booted in download mode, and I have the drivers installed (Windows 11). I can compile the code just fine using VS Code with ESP IDF (just the blink test program for now).
When I try to flash the chip via DFU, dfu-util seems to be able to detect and communicate with the device, but the download never goes past 0%, and then I get an error:
Code: Select all
Error during download get_status (LIBUSB_ERROR_TIMEOUT)
Code: Select all
PS C:\Users\Malman\Desktop> dfu-util -d 303a:2 -D c:\Users\Malman\Documents\Electronics\clock_firmware_test\blink\build\dfu.bin
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Opening DFU capable USB device...
Device ID 303a:0002
Run-Time device DFU version 0110
Claiming USB DFU (Run-Time) Interface...
Setting Alternate Interface zero...
Determining device status...
DFU state(0) = appIDLE, status(0) = No error condition is present
Device really in Run-Time Mode, send DFU detach request...
error detaching
Device will detach and reattach...
Opening DFU USB Device...
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 64
Copying data from PC to DFU device
Download [ ] 0% 0 bytesError during download get_status (LIBUSB_ERROR_TIMEOUT)
Code: Select all
PS C:\Users\Malman\Desktop> dfu-util -l
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Found Runtime: [303a:0002] ver=0723, devnum=35, cfg=1, intf=2, path="2-3.1", alt=0, name="UNKNOWN", serial="0"
This is my first time using the built-in USB controller rather than a USB-UART bridge.
Has anyone faced this problem before or does anyone know how it might be solved?