I have two ESP32-C3 Super Mini boards.
I connect them to USB while pressing the boot button to force the download mode.
Although the serial monitor shows "waiting for download", no sketch can be uploaded.
Both boards show the same error.
I tried USB CDC on boot enabled and disabled, set the speed to 115200, tried it with and without EspTool as programmer - nothing. As soon as the IDE tries to upload the code, it always fails with
error 2.
Nothing is connected to the board except the USB cable to the pc. I'm running Arduino IDE 2.3.2 with current ESP libraries. I tried an older version (1.8.6) - same error.
Any advice?
Here's my example output from serial and upload:
Serial monitor when plugging in:
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x7 (DOWNLOAD(USB/UART0/1))
Saved PC:0x400462e2
waiting for download
Error message with sketch "Blink":
Sketch uses 233946 bytes (17%) of program storage space. Maximum is 1310720 bytes.
Global variables use 13676 bytes (4%) of dynamic memory, leaving 314004 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.5.1
Serial port COM5
Connecting...
Chip is ESP32-C3 (revision v0.4)
Features: WiFi, BLE
Crystal is 40MHz
MAC: dc:da:0c:8e:c2:94
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00010000 to 0x0004bfff...
Compressed 243840 bytes to 136424...
A fatal error occurred: Packet content transfer stopped (received 8 bytes)
Failed programming: uploading error: exit status 2
There are SuperMini variants being sold with the CORE ESP32C3 which does not have the SRAM on the chip and is useless in this form factor. Make sure your module has the ESP32C3FN4 chip and the set the CDC on Boot to enabled. This fact will stop you from pulling your hair out. (I got burned the same way!!!)
I've experienced today my first bricking of an ESP32-C3 Supermini.
I suspect the problem was that I was attempting to load software while using pins 9 and 10 for UART1 and had another device connected to it. Pin 9 is a "strapping" pin and should be high at boot up (see reference below).
Anyway, the USB connection could not be used. I attempted resetting while the boot button was held in but this did not help.
I connected an external USB UART adapter to GPIO pins 20/21 which allowed the Supermini to show a start up sequence on the console and then tried a number of tricks as listed below but I am not now sure exactly which actually helped:
Restarting the PC
Pulling GPIO 2, 8 and 9 high during a start up
Disabling (and later re-enabling) CDC on boot.
Holding the boot button in during a start sequence.
I had a similar problem with two of my super minis. I was able to save them using the esptool serial bootloader from Espressif. I followed the next steps:
dowload esptool
prepare a simple sketch and try to upload it
you will get a log error like this:
El Sketch usa 892674 bytes (68%) del espacio de almacenamiento de programa. El máximo es 1310720 bytes.
Las variables Globales usan 33548 bytes (10%) de la memoria dinámica, dejando 294132 bytes para las variables locales. El máximo es 327680 bytes.
"C:\Users\Casa\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.6/esptool.exe" --chip esp32c3 --port "COM8" --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode keep --flash_freq keep --flash_size keep
0x0 "C:\Users\Casa\AppData\Local\Temp\arduino\sketches\4B9A998A5561E02A1114F5B04F4F01CA/sketch_aug23a.ino.bootloader.bin"
0x8000 "C:\Users\Casa\AppData\Local\Temp\arduino\sketches\4B9A998A5561E02A1114F5B04F4F01CA/sketch_aug23a.ino.partitions.bin"
0xe000 "C:\Users\Casa\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.4/tools/partitions/boot_app0.bin"
0x10000 "C:\Users\Casa\AppData\Local\Temp\arduino\sketches\4B9A998A5561E02A1114F5B04F4F01CA/sketch_aug23a.ino.bin"
esptool.py v4.6
Serial port COM8
Connecting...
Chip is ESP32-C3 (revision v0.4)
Features: WiFi, BLE
Crystal is 40MHz
MAC: f0:f5:bd:fd:ce:9c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
A fatal error occurred: No serial data received.
Failed uploading: uploading error: exit status 2
use esptool to manually upload the 4 files that failed
execute the python esptool with the correct arguments