ESP32 S3 not flashing

I am using ESP32 S3 DevKitC-1 N16R8. When I upload it with Arduino IDE, it works, but when I compile and upload it with Esphome web, I get the following errors.

esphome:
  name: esp32s3

esp32:
  board: esp32-s3-devkitc-1
  variant: ESP32S3
  flash_size: 16MB 
  framework:
    type: esp-idf
  

logger:
  level: DEBUG
  baud_rate: 115200

Logs after installation. The following code is looping continuously

[00:41:26]ESP-ROM:esp32s3-20210327
[00:41:26]Build:Mar 27 2021
[00:41:26]rst:0x7 (TG0WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
[00:41:26]Saved PC:0x400454d5
[00:41:26]SPIWP:0xee
[00:41:26]mode:QIO, clock div:1
[00:41:26]load:0x3c080020,len:0x21034
[00:41:26]ets_loader.c 78 

The following picture is the Arduino test code and settings. It works fine when uploaded with Arduino.

I have the same board (from aliExpress with no documentation or support) for several months and use almost the same definition:

esp32:
  board: esp32-s3-devkitc-1         # devkit from AliExpress
  variant: esp32s3
  flash_size: 16MB
  framework:
    type: esp-idf
    version: recommended

psram:
  mode: octal
  speed: 80MHz

packages:
  wi-fi: !include _common_wifi.yaml

logger:
  level: DEBUG
  hardware_uart: uart0     # right USB-C with uart0 shows only the hardware initialisation before calling app_main() unless you add this line
#  level: VERBOSE

esphome:
  name: $devicename
  platformio_options:
    board_build.flash_mode: dio 
  on_boot: 
    then:
    - logger.log: " "
    - logger.log: "########## ON_BOOT ##########"

  on_shutdown:
    - priority: -100
      then:
      - logger.log: "##### on_shutdown -100 finished. " 

Is that your full yaml code ? If so, it could be that you haven’t given the ESP32 anything to do, so it is doing nothing over and over again.

Looking at the USB log from my ESP32, the first difference is that mine shows [2025-06-21 07:52:05] mode:DIO, clock div:1 before continuing with details of where it is loading the program, etc. … so maybe see if board_build.flash_mode: dio helps.

First of all, thank you very much for your code. It finally worked.

The problem was that there was no code below.

platformio_options:
    board_build.flash_mode: dio 

I just simplified it a bit and it worked in the code below.

esphome:
  name: esp32s3
  platformio_options:
    board_build.flash_mode: dio 

esp32:
  board: esp32-s3-devkitc-1         # devkit from AliExpress
  variant: esp32s3
  flash_size: 16MB
  framework:
    type: esp-idf
    version: recommended

logger:

api:
  encryption:
    key: "sssssssssssssssssssssssssssssssssssssssssss="

ota:
  - platform: esphome
    password: ""

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

1 Like