I’m trying to upload ESPHome to ESP32 S2 mini “ESP32-S2FN4R2”, but I can’t flash it using web nor espflasher nor esptool.
I thought that the board is faulty, so I tried flashing anything onto it with ArduinoIDE and it works, I can upload blink sketch with no problems (I know to hold the BOOT button, and reset after flashing). I’ve tried with 2 different boards, same issue.
I’ve tried installing different drivers (zadig, cp210x, ch340, etc), changing the com port speed to 115200, and more; nothing works.
From ESP flashers I’m getting
Using 'COM5' as serial port.
Unexpected error: Cannot configure port, something went wrong. Original message: PermissionError(13, 'A device attached to the system is not functioning.', None, 31)
output from ArduinoIDE; flashing blink sketch:
"AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.6/esptool.exe" --chip esp32s2 --port "COM5" --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode keep --flash_freq keep --flash_size keep 0x1000 "AppData\Local\Temp\arduino\sketches\560B72A77F94C94826FDB33CDE61833C/Blink.ino.bootloader.bin" 0x8000 "AppData\Local\Temp\arduino\sketches\560B72A77F94C94826FDB33CDE61833C/Blink.ino.partitions.bin" 0xe000 "AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1/tools/partitions/boot_app0.bin" 0x10000 "AppData\Local\Temp\arduino\sketches\560B72A77F94C94826FDB33CDE61833C/Blink.ino.bin"
esptool.py v4.6
Serial port COM5
Connecting...
Chip is ESP32-S2FNR2 (revision v0.0)
Features: WiFi, Embedded Flash 4MB, Embedded PSRAM 2MB, ADC and temperature sensor calibration in BLK2 of efuse V2
Crystal is 40MHz
MAC:
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00004fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x0004bfff...
Compressed 15568 bytes to 11011...
Writing at 0x00001000... (16 %)
Writing at 0x00001c23... (33 %)
Writing at 0x00002767... (50 %)
Writing at 0x00003244... (66 %)
Writing at 0x00003ba6... (83 %)
Writing at 0x00004887... (100 %)
Wrote 15568 bytes (11011 compressed) at 0x00001000 in 0.5 seconds (effective 260.4 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 146...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.1 seconds (effective 215.8 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.2 seconds (effective 415.0 kbit/s)...
Hash of data verified.
Compressed 244976 bytes to 138447...
Writing at 0x00010000... (1 %)
Writing at 0x00011177... (2 %)
Writing at 0x00012998... (4 %)
Writing at 0x00013f7c... (5 %)
Writing at 0x0001599b... (7 %)
Writing at 0x00017381... (8 %)
Writing at 0x00018831... (10 %)
Writing at 0x0001a03d... (11 %)
Writing at 0x0001c45f... (13 %)
Writing at 0x0001e4f0... (14 %)
Writing at 0x0001f65b... (16 %)
Writing at 0x0002010a... (17 %)
Writing at 0x00020d19... (19 %)
Writing at 0x0002184b... (20 %)
Writing at 0x0002223b... (22 %)
Writing at 0x00022caa... (23 %)
Writing at 0x00023719... (25 %)
Writing at 0x00024316... (26 %)
Writing at 0x00024d99... (27 %)
Writing at 0x00025832... (29 %)
Writing at 0x00026353... (30 %)
Writing at 0x00026ccf... (32 %)
Writing at 0x000276b3... (33 %)
Writing at 0x000280d5... (35 %)
Writing at 0x00028bb8... (36 %)
Writing at 0x00029621... (38 %)
Writing at 0x00029f99... (39 %)
Writing at 0x0002aabf... (41 %)
Writing at 0x0002b4ca... (42 %)
Writing at 0x0002bec7... (44 %)
Writing at 0x0002c828... (45 %)
Writing at 0x0002d38c... (47 %)
Writing at 0x0002dda7... (48 %)
Writing at 0x0002e990... (50 %)
Writing at 0x0002f353... (51 %)
Writing at 0x0002fd58... (52 %)
Writing at 0x00030890... (54 %)
Writing at 0x000313da... (55 %)
Writing at 0x00031f57... (57 %)
Writing at 0x00032933... (58 %)
Writing at 0x000333ba... (60 %)
Writing at 0x00034009... (61 %)
Writing at 0x00035283... (63 %)
Writing at 0x0003611d... (64 %)
Writing at 0x0003819f... (66 %)
Writing at 0x00039ee0... (67 %)
Writing at 0x0003a89a... (69 %)
Writing at 0x0003b276... (70 %)
Writing at 0x0003c0ff... (72 %)
Writing at 0x0003d4ef... (73 %)
Writing at 0x0003eda5... (75 %)
Writing at 0x00040620... (76 %)
Writing at 0x00041041... (77 %)
Writing at 0x00041a7c... (79 %)
Writing at 0x000424e2... (80 %)
Writing at 0x00042f06... (82 %)
Writing at 0x00043ad2... (83 %)
Writing at 0x000446ad... (85 %)
Writing at 0x000450de... (86 %)
Writing at 0x00045b29... (88 %)
Writing at 0x000465ef... (89 %)
Writing at 0x00047111... (91 %)
Writing at 0x00047b3b... (92 %)
Writing at 0x000486dc... (94 %)
Writing at 0x000493fd... (95 %)
Writing at 0x00049ffc... (97 %)
Writing at 0x0004a9ad... (98 %)
Writing at 0x0004b4ea... (100 %)
Wrote 244976 bytes (138447 compressed) at 0x00010000 in 5.4 seconds (effective 365.0 kbit/s)...
Hash of data verified.
Leaving...
WARNING: ESP32-S2FNR2 (revision v0.0) chip was placed into download mode using GPIO0.
esptool.py can not exit the download mode over USB. To run the app, reset the chip manually.
To suppress this note, set --after option to 'no_reset'.
Failed uploading: uploading error: exit status 1