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
I know this thread is closed but I found something odd with the exact same problem. I have not tried the recommended solution here but will. For the first time, of my many ESP32 chips, my new ESP32 C3 (the Lolin C3 Mini). When I plugged my new ESP32 C3 Mini into the USB-C connector it continually connected and disconnected from Windows. I found that downloading the blink sketch in the Arudino IDE calmed it down and it would connect and stay connected. My next issue was downloading my sketch to my ESP32-C3 Mini in Plaformio. Worked great the first time. Then I made a small change and tried to download again and it failed and failed and failed. I finally decided to see if I could put Blink back on thESP32-C3 with Arduino IDE and voila! It worked. Then I went back into PlatformIO and downloaded by sketch and it worked. Again, I made another minor change and it failed to download the sketch again. My fix has been to download blink in Arduino IDE, then my sketch in PlatformIO, and then Blink, then mine, etc. My thought is Arduino IDE is doing something different after downloading the sketch that leaves the C3 in a happier state. I can repeatedly download the same sketch in Arduino IDE but not PlatformIO. I would really love to know what causes this behavior. I suspect it is something about boot mode, but I wonder what. Last, my sketch won't just run in either PlatformIO or Arudino IDE. I have to unplug the USB-C from the ESP32 C3 and plug it back in and it runs. Again, this must have something to do with the boot/load state the C3 is left in after flashing it.
Hi, first post here but something I noticed with the type C connecter was sometimes I could upload and sometimes I could not. Then by chance I uses a Micro USB lead with a "micro" to "C" adaptor on the end and it worked without issue. swapped back to type C lead and encountered problems again. Now I'm not saying that the issue here but that was my experiance.
Every little helps.