Boot loop on ESP32-S3-WROOM

I’ve tried virtually every combination of board, variant, framework, and board_build.flash_mode:dio, flashing from esptool and from web.esphome.io, and I always get a boot loop. Also tried a second board from the same batch.

If I use arduino framework, it just reboots over and over:

[17:41:59]ESP-ROM:esp32s3-20210327
[17:41:59]Build:Mar 27 2021
[17:41:59]rst:0x10 (RTCWDT_RTC_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
[17:41:59]SPIWP:0xee
[17:41:59]mode:QIO, clock div:1
[17:41:59]load:0x3c090020,len:0x19b54
[17:41:59]ets_loader.c 78

If I use the esp-idf framework it complains about SHA-256 comparison failed, attempts to boot, and fails.

[18:38:05]entry 0x40375dc0
[18:38:05]ESP-ROM:esp32s3-20210327
[18:38:05]Build:Mar 27 2021
[18:38:05]rst:0x10 (RTCWDT_RTC_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
[18:38:05]SPIWP:0xee
[18:38:05]mode:DIO, clock div:1
[18:38:05]load:0x3c0a0020,len:0x2723c
[18:38:05]load:0x3fc98c00,len:0x47a4
[18:38:05]load:0x40374000,len:0x4608
[18:38:05]load:0x42000020,len:0x9c848
[18:38:05]load:0x40378608,len:0x10538
[18:38:05]SHA-256 comparison failed:
[18:38:05]Calculated: a3a9ff4c5297a1b1067a9030766520f72a20f1d43d65b1db56377f6c9883d6bb
[18:38:05]Expected: 59727802250b332dc5db4031537c007f74d1fa36b6567e7daa7ccbf2654969a5
[18:38:05]Attempting to boot anyway...

ESP32-S3-WROOM 38-pin board is:

Detecting chip type... ESP32-S3
Chip is ESP32-S3 (QFN56) (revision v0.2)
Features: WiFi, BLE, Embedded PSRAM 2MB (AP_3v3)

**Espressif ESP32-S3FH4R2 - WiFi+BLE chip**
* QFN56.
* SRAM memory:
* PSRAM memory: 2 MB.
* FLASH memory: 4 MB.

I run esphome clean before each esphome compile on ESPHome 2025.6.2:

root@6efffbd03674:/config# esphome compile soil.yaml
INFO ESPHome 2025.6.2
INFO Reading configuration soil.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing soil (board: adafruit_feather_esp32s3; framework: espidf; platform: https://github.com/pioarduino/platform-espressif32/releases/download/53.03.13/platform-espressif32.zip)
--------------------------------------------------------------------------------------------------------------------------
HARDWARE: ESP32S3 240MHz, 320KB RAM, 4MB Flash
 - framework-espidf @ 3.50302.0 (5.3.2) 
 - tool-cmake @ 3.30.2 
 - tool-esptoolpy @ 4.8.6 
 - tool-mklittlefs @ 3.2.0 
 - tool-ninja @ 1.10.2 
 - tool-riscv32-esp-elf-gdb @ 14.2.0+20240403 
 - tool-xtensa-esp-elf-gdb @ 14.2.0+20240403 
 - toolchain-esp32ulp @ 2.35.0-20220830 
 - toolchain-riscv32-esp @ 13.2.0+20240530 
 - toolchain-xtensa-esp-elf @ 13.2.0+20240530

I’ve tried board esp32-s3-devkitc-1 esp32devkit, esp32s3box, adafruit_feather_esp32s3. I’ve also tried defining the flash size in platformio_options, or not, and again with and without the dio flash_mode:

esphome:
  name: soil
  platformio_options:
    board_build.flash_mode: dio
    board_build.f_flash: 40000000L
    board_build.flash_size: 4MB

Basically, it seems like it’s flashing incorrectly, but I really don’t know.

I’ve had no problems with esp8266 boards, but this is my first ESP32-S3 batch.

Thanks in advance for any pointers. Been going in circles.

Are you using cable to flash?

Yes. Both esptool and web.esphome.io via usb:

> esptool.py -p /dev/cu.wchusbserial58CF0933561 write_flash 0x0 firmware.bin
esptool.py v4.8.1
Serial port /dev/cu.wchusbserial58CF0933561
Connecting...
Detecting chip type... ESP32-S3
Chip is ESP32-S3 (QFN56) (revision v0.2)
Features: WiFi, BLE, Embedded PSRAM 2MB (AP_3v3)
Crystal is 40MHz
MAC: d8:3b:da:76:b1:30
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00039fff...
Compressed 235424 bytes to 128585...
Wrote 235424 bytes (128585 compressed) at 0x00000000 in 11.4 seconds (effective 164.7 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
>

Clean your built files.
Post your yaml.

I’ve done a esphome clean before each compile. I’ve tried about 20 combinations of yaml files, but, boiled down, they look like:


esphome:
  name: soil
  platformio_options:
    board_build.flash_mode: dio
    # following have no effect
    # board_build.f_flash: 40000000L
    # board_build.flash_size: 4MB

esp32:
  board: adafruit_feather_esp32s3
  # same result
  # board: esp32-s3-devkitc-1
  # variant: esp32s3
  framework:
    # type: arduino
    # sha-256 comparison
    type: esp-idf
    version: recommended
     # following have no effect
     #sdkconfig_options:
     # COMPILER_OPTIMIZATION_SIZE: y

Note that i’ve tried nearly every combination of the cross product of: framework, flash_mode, board, variant, sdk_config_options. None have any effect other than to change the reboot cycle messages, as described above.

Any wiring beyond usb cable?

No. Board has headers but they aren’t connected to anything. Also tried with a second board of the same type, no headers.

Note both boards load and execute Arduino code from the IDE just fine.

1 Like

You could post the working board definition on IDE.

It’s just vanilla “ESP32S3 Dev Module” in Arduino board definition.

Even if I copy all the Arduino esptool command line options to load ESPHome firmware.bin:

> esptool.py --chip esp32s3 --port "/dev/cu.wchusbserial58CF0933561" --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode keep --flash_freq keep --flash_size keep 0x0 firmware.bin

I get the same result as using:

> esptool.py -p /dev/cu.wchusbserial58CF0933561 write_flash 0x0 firmware.bin

Both my command line and Arduino use esptool v4.8.1


I tried copying the flash frequency I found in the Arduino build link phase:

/Users/john/Library/Arduino15/packages/esp32/tools/esptool_py/4.9.dev3/esptool --chip esp32s3 elf2image --flash_mode dio --flash_freq 80m --flash_size 4MB --elf-sha256-offset 0xb0 -o /Users/john/Library/Caches/arduino/sketches/F1A89E49EEB6A1A3CDE2BBB488E8A835/sketch_jun30a.ino.bin /Users/john/Library/Caches/arduino/sketches/F1A89E49EEB6A1A3CDE2BBB488E8A835/sketch_jun30a.ino.elf
esptool.py v4.8.1

as:

> esptool.py --chip esp32s3 --port "/dev/cu.wchusbserial58CF0933561" --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode keep --flash_freq 80m --flash_size keep 0x0 firmware.bin

and also again via the yaml:

esphome:
  name: soil
  platformio_options:
    board_build.flash_mode: dio
    board_build.f_flash: 40000000L
    board_build.flash_size: 4MB
    board_built.flash_freq: 80m

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: esp-idf
    version: recommended

> esptool.py -p /dev/cu.wchusbserial58CF0933561 write_flash 0x0 firmware.bin
esptool.py v4.8.1
Serial port /dev/cu.wchusbserial58CF0933561
Connecting...
Detecting chip type... ESP32-S3
Chip is ESP32-S3 (QFN56) (revision v0.2)
Features: WiFi, BLE, Embedded PSRAM 2MB (AP_3v3)
Crystal is 40MHz
MAC: d8:3b:da:76:b1:30
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00039fff...
Compressed 235424 bytes to 128586...
Wrote 235424 bytes (128586 compressed) at 0x00000000 in 11.4 seconds (effective 164.8 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

All three methods of changing the flash speed had no effect.

I wonder if the –elf-sha256-offset 0xb0 above is important somehow?

Is there anything else in your YAML file, or does it end with “version: recommended”? Maybe you should post the entire YAML file.

I’ve always tried to keep the beginning part as short and simple as possible:

esphome:
  name: soil

esp32:
  board: adafruit_feather_esp32s3
  framework:
    type: arduino

I somehow don’t think the problems are coming from this part.

There’s nothing else in the YAML file. I can add all sorts of features, sensors, etc to the file, and all it does is make the download take longer. Still the same boot loop. The board really never executes any of the ESPHome code, or so it seems.

And using arduino framework flashed via cable gives you boot-loop??

I have never used a shorter YAML file than:

esphome:
  name: soil

esp32:
  board: adafruit_feather_esp32s3
  framework:
    type: arduino

logger:

# Required for Homeassistant web interface
api:
  encryption:
    key: "adadasdasdasdasda"

ota:
  - platform: esphome
    password: "fsdfsdfdssdf"

wifi:
  ssid: "MY_NETWORK"
  password: "MY_PASSWORD"

(plus at least one sensor or output)

Yes I’ve tried the cross product of board, framework, loader, etc. etc. See the first post for how the boot loop changes between frameworks.

I’ve also tried changing the version of esp-idf framework to latest as well as recommended.

I’ve also tried

  platformio_options:
    build_flags: "-DBOARD_HAS_PSRAM"

and

    sdkconfig_options:
      CONFIG_ESP32_S3_BOX_BOARD: "y"
      COMPILER_OPTIMIZATION_SIZE: "y"

neither of which had any effect.

Adding those extra stanzas, or similar ones, has no effect. I don’t think the ESPHome code is executing at all. It’s failing at the boot loader → ESPHome .bin transition.