ESP32 Reboot Loop - invalid header After Flashing (Flash Encryption Enabled)

Vaibhav02
Posts: 32
Joined: Wed Sep 04, 2024 8:09 am

ESP32 Reboot Loop - invalid header After Flashing (Flash Encryption Enabled)

Postby Vaibhav02 » Mon May 19, 2025 10:21 am

Hi everyone,

I'm facing an issue with my ESP32 where it keeps rebooting with the following log on serial monitor:

Code: Select all

ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0xf82bbea3
invalid header: 0xf82bbea3
...
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0xf82bbea3
...
Context:
ESP32 Chip: ESP32-D0WD-V3 (rev 3.1)

ESP-IDF Version: v5.3

Baud rate: 115200

Flash encryption: Enabled (FLASH_CRYPT_CNT = 1)

DISABLE_DL_DECRYPT = True (seen in espefuse.py summary)

ahsrabrifat
Posts: 201
Joined: Sat Jan 18, 2025 2:31 pm

Re: ESP32 Reboot Loop - invalid header After Flashing (Flash Encryption Enabled)

Postby ahsrabrifat » Mon May 19, 2025 3:59 pm

If you're using ESP-IDF:

Run the build and flash like this:

Code: Select all

idf.py build
idf.py encrypted-flash
If you flash with esptool.py directly, use:

Code: Select all

esptool.py --chip esp32 encrypt_flash \
  --keyfile encryption_key.bin \
  --addr 0x10000 firmware.bin
Make sure the bootloader and partition table are also encrypted if needed.

Vaibhav02
Posts: 32
Joined: Wed Sep 04, 2024 8:09 am

Re: ESP32 Reboot Loop - invalid header After Flashing (Flash Encryption Enabled)

Postby Vaibhav02 » Tue May 20, 2025 6:24 am

Hi @ahsrabrifat,
Thank you for your response. I am using ESP-IDF and have already tried this using the monitor, but the same error occurs.

Who is online

Users browsing this forum: Applebot, meta-externalagent, PetalBot and 3 guests