esp-idf icon indicating copy to clipboard operation
esp-idf copied to clipboard

ESP32S3 Cannot start after downloading the program (IDFGH-6142)

Open Kevincoooool opened this issue 4 years ago • 20 comments

After I downloaded the program as usual, the restart prompt failed to start. It has happened twice, and it can only be solved by replacing the module. Is the module damaged?

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x2b (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x178c
load:0x3b600000,len:0x8c8ff
Invalid image block, can't boot.
ets_main.c 329
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x2b (SPI_FAST_FLASH_BOOT)
Saved PC:0x40043ac8
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x178c
load:0x3b600000,len:0x8c8ff
Invalid image block, can't boot.
ets_main.c 329
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x2b (SPI_FAST_FLASH_BOOT)
Saved PC:0x40043ac8
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x178c

这种情况是FLASH已损坏,需要打开屏蔽罩更换FLASH芯片即可

Kevincoooool avatar Nov 03 '21 02:11 Kevincoooool

@Kevincoooool Do I understand this correctly that this problem only persist on one particular module and if you flash the same project to other modules these other modules don't have problems running the application?

0xjakob avatar Nov 04 '21 02:11 0xjakob

@Kevincoooool Thanks for reporting, would you please help share if any updates for the issue? Thanks.

Alvin1Zhang avatar Nov 22 '21 02:11 Alvin1Zhang

@Kevincoooool Thanks for reporting, would you please help share if any updates for the issue? Thanks.

Hello, when I use the D2 version of ESP32S3, I downloaded the program normally as usual. After the download, I restarted and the above error occurred. It was accidental and there was no specific condition. It appeared twice. I opened the shield. After replacing the FLASH chip, re-downloading is normal, indicating that the FLASH chip is damaged by ESP32

Kevincoooool avatar Dec 04 '21 02:12 Kevincoooool

@Kevincoooool we had the same problem, but with the ESP32C3, and we put the module in boot mode and then start ESP-IDF cmd tool. After this we go to our project folder and run idf.py set-target esp32c3 when this is done we run idf.py flash after this reset the board without boot mode and we can use our board again. Maybe you can try this with your target.

We "broke" our flash while we tried to program with the wrong target settings.

Hope this can help you out

RobVlaar avatar Dec 07 '21 09:12 RobVlaar

Same error when following the tutorials in https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html#step-8-build-the-project

command

idf.py set-target esp32s3
idf.py build 
~/.espressif/python_env/idf4.3_py3.9_env/bin/python ../esp-idf/components/esptool_py/esptool/esptool.py -p /dev/cu.usbserial-14410 -b 460800 --before default_reset --after hard_reset --chip esp32s3  write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x1000 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/hello-world.bin
idf.py -p /dev/cu.usbserial-14410 monitor

error message:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x10 (RTCWDT_RTC_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x15c8
load:0x65202e6e,len:0x3d207272
Invalid image block, can't boot.
ets_main.c 329

zhangtemplar avatar Dec 27 '21 08:12 zhangtemplar

I have the same problem. I solved this problem by unplugging and reinserting the USB.

zhongwei avatar Feb 05 '22 15:02 zhongwei

I have the same problem, but unplugging and reinserting the USB didn't work for me:

ESP-ROM:esp32s3-20210327 Build:Mar 27 2021 rst:0x7 (TG0WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT) Saved PC:0x40043ac8 SPIWP:0xee mode:DIO, clock div:1 load:0x3fcd0108,len:0x15c8 load:0x3ff48000,len:0x40009258 Invalid image block, can't boot.

gmarcc avatar Apr 24 '22 07:04 gmarcc

Has anyone found a solution yet?

MATTYGILO avatar May 06 '22 10:05 MATTYGILO

Having the same issue. Any solution?

BrandonNVZNLabs avatar May 15 '22 03:05 BrandonNVZNLabs

Bump, seeing the same issue - board was working fine, and then started getting this invalid image block issue

Power cycling does not resolve, reverting to an older project doesnt resolve, erasing flash, fresh clone/build doesnt fix.

Any possibility its an issue with secure boot? Damage to hardware?

tvanfossen avatar May 23 '22 13:05 tvanfossen

Having the same issue. Any solution?

22:12:58.676 -> ESP-ROM:esp32s3-20210327
22:12:58.676 -> Build:Mar 27 2021
22:12:58.676 -> rst:0x7 (TG0WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
22:12:58.676 -> Saved PC:0x40043ac8
22:12:58.676 -> SPIWP:0xee
22:12:58.676 -> mode:DIO, clock div:1
22:12:58.676 -> load:0x3fce3808,len:0x43c
22:12:58.676 -> load:0x3c970000,len:0xbecff
22:12:58.676 -> Invalid image block, can't boot.
22:12:58.676 -> ets_main.c 329 
22:12:58.956 -> ESP-ROM:esp32s3-20210327
22:12:58.956 -> Build:Mar 27 2021
22:12:58.956 -> rst:0x10 (RTCWDT_RTC_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
22:12:58.956 -> SPIWP:0xee
22:12:58.956 -> mode:DIO, clock div:1
22:12:58.956 -> load:0x3fce3808,len:0x43c
22:12:58.956 -> load:0x3c970000,len:0xbecff
22:12:58.956 -> Invalid image block, can't boot.
22:12:58.956 -> ets_main.c 329 

igcxl avatar Jul 12 '22 14:07 igcxl

Same issue with mine. Any solutions? or do i have to solder a new module?

demitriaswilbert avatar Aug 18 '22 04:08 demitriaswilbert

经常出现, 太难受了

lgh0322 avatar Oct 06 '22 05:10 lgh0322

也有同样的问题。我通过拔下并重新插入 USB 解决了这个问题 This problem occurs when I use the trust module of the esp32c3. It can be solved by unplugging the USB

shawvyu avatar Oct 31 '22 04:10 shawvyu

just encountered this. ordering a replacement board for now

patrickrb avatar Oct 27 '23 01:10 patrickrb

使用PlatformIO+Arduino按网上的方法配置Falsh和PSRAM后,下载程序就不停的发送以下内容: ESP-ROM:esp32s3-20210327 Build:Mar 27 2021 rst:0x8 (TG1WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT) Saved PC:0x40377f79 SPIWP:0xee mode:DIO, clock div:1 load:0x3fce3808,len:0x44c load:0x403c9700,len:0xbe4 load:0x403cc700,len:0x2a68 entry 0x403c98d4

在platformio.ini文件中配置内如如下: [env:esp32-s3-devkitc-1] platform = espressif32 board = esp32-s3-devkitc-1 framework = arduino ; 指定为16MB的FLASH分区表 board_build.arduino.partitions = default_16MB.csv ; 指定FLASH和PSRAM的运行模式 board_build.arduino.memory_type = opi_opi ; 预定义宏,启用PSRAM build_flags = -DBOARD_HAS_PSRAM ; 指定FLASH容量为16MB board_upload.flash_size = 16MB

如果把上面新增的配置内容删掉就正常了。

F1642358 avatar Nov 07 '23 07:11 F1642358

I've had a similar issue with the ESP32-C6 chip. My resolution was fixing the bootloader's flash address. It used to be 0x1000 for previous models but with the C6 it is 0x0.

I see that the S3 has the same bootloader address so it might be the issue for you too.

https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/bootloader.htm

Bootloader is located at the address 0x0 in the flash.

It is always a good idea to erase the flash entirely when flashing a new image, eg.: esptool.py --chip esp32s3 --port /dev/ttyACM0 write_flash --flash_mode dio --erase 0x0 bootloader.bin 0x8000 partition-table.bin 0x10000 example-app.bin

dlakatos847 avatar Feb 02 '24 16:02 dlakatos847

I have the same issue on an ESP32S3 AI-S3 module ESP32-S3-WROOM-1 MON8R2 (similar to YD-ESP32-23 2022-V1.3 which in turn is similar to esp32s3 devkitc:

02:23:00.623 -> ESP-ROM:esp32s3-20210327
02:23:00.670 -> Build:Mar 27 2021
02:23:00.670 -> rst:0x1 (POWERON),boot:0x2b (SPI_FAST_FLASH_BOOT)
02:23:00.670 -> SPIWP:0xee
02:23:00.670 -> mode:DIO, clock div:1
02:23:00.670 -> load:0x3fce3808,len:0x44c
02:23:00.670 -> load:0x3c970000,len:0xbd8ff
02:23:00.670 -> Invalid image block, can't boot.
02:23:00.670 -> ets_main.c 329 

I've tried erasing the flash, flashing manually, espressif tool to flash (flash_download_tool_3.9.5) and nothing works. What i think happened is that opened an arduino project and it was set to a normal ESP32 and then flashing broke the flash chip or some setting like efuse.

esptool.exe read_flash_status
esptool.py v4.7.0
Found 3 serial ports
Serial port COM9
Connecting....
Detecting chip type... ESP32-S3
Chip is ESP32-S3 (QFN56) (revision v0.1)
Features: WiFi, BLE, Embedded PSRAM 2MB (AP_3v3)
Crystal is 40MHz
MAC: 68:b6:b3:29:f9:1c
Uploading stub...
Running stub...
Stub running...
Status value: 0x7bfc
Hard resetting via RTS pin...

ramalhais avatar Feb 17 '24 02:02 ramalhais

Solved by setting flash frequency at 120Mhz

projectatrts avatar Mar 22 '24 11:03 projectatrts

The problem is the bootloader address

Bootloader is located at the address 0x0 in the flash.

Find wherever you performed the flash, and change your incorrect 0x1000 to 0x0 and re-flash.

gitcnd avatar May 11 '24 07:05 gitcnd