esp8685 spontaneously enters boot loop with "invalid header: 0xffffff7f"
Posted: Thu Oct 09, 2025 12:08 pm
key words:
esp8685, esp32c3, esp32-c3, invalid header, boot, internal flash.
hello,
I am working on a board that contains the esp8685h4 chip. i use the ESP's internal 4Mbyte NOR flash for burning code and saving data during run.
when i run my program, it can be functioning properly for many hours, using Wi-Fi and other available features. However, on some occasions that i haven't managed to fully understand, the esp8685 might suddenly enter a boot-loop with the following logs:
ESP-ROM: esp32-c-api1-20210207
build:February 7 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
saved pc: 0x4004d1f8
invalid header: 0xffffff7f
invalid header: 0xffffff7f
invalid header: 0xffffff7f
invalid header: 0xffffff7f
...
invalid header: 0xffffff7f
ESP-ROM: esp32-c-api1-20210207
build:February 7 2021
rst:0x10 (TG0WDT_RTC_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
saved pc: 0x4004d1f8
invalid header: 0xffffff7f
invalid header: 0xffffff7f
...
invalid header: 0xffffff7f
note:
there might be some other rst codes that i haven't mentioned here. also note that i had to type these logs by hand so there might be some inaccuracies.
When i power off and back on the VCC of the ESP, this loop stops and the esp successfully boots.
on the other hand, pulling CHIP_PU down and up again doesn't get the ESP back to life.
over the time of my work i successfully recreated this issue in a few ways:
1. sometimes, after flashing the ESP8685 on my board, it enters this state. this is rather rare and of less concern for me, as i can simply retry the flashing process and normally it completes successfully.
2. spamming the chip_pu pin on and off repeatedly, causing a lot of consecutive boot attempts also might trigger this faulty behavior. again, this is rare and i haven't been able to get it to happen often with this approach.
3. finally, i open a serial communication port between the ESP and my PC, and perform a read_flash task using esptool on the cmd. as the esp half way through the read_flash process, i reset it via toggling the chip_pu pin. sometimes, this sequence of events also causes the boot-loop to occur, but again - not very often.
i am pretty sure that there is something wrong with the communication between the esp8685 and its internal NOR flash, but i couldn't figure out what the issue is.
unfortunately, the SPI communication lines between the esp8685 and int flash are internal to the chip and unavailable to examine, so i don't really know how to figure out what is going on.
i would kindly appreciate any help provided here.
thank you!
esp8685, esp32c3, esp32-c3, invalid header, boot, internal flash.
hello,
I am working on a board that contains the esp8685h4 chip. i use the ESP's internal 4Mbyte NOR flash for burning code and saving data during run.
when i run my program, it can be functioning properly for many hours, using Wi-Fi and other available features. However, on some occasions that i haven't managed to fully understand, the esp8685 might suddenly enter a boot-loop with the following logs:
ESP-ROM: esp32-c-api1-20210207
build:February 7 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
saved pc: 0x4004d1f8
invalid header: 0xffffff7f
invalid header: 0xffffff7f
invalid header: 0xffffff7f
invalid header: 0xffffff7f
...
invalid header: 0xffffff7f
ESP-ROM: esp32-c-api1-20210207
build:February 7 2021
rst:0x10 (TG0WDT_RTC_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
saved pc: 0x4004d1f8
invalid header: 0xffffff7f
invalid header: 0xffffff7f
...
invalid header: 0xffffff7f
note:
there might be some other rst codes that i haven't mentioned here. also note that i had to type these logs by hand so there might be some inaccuracies.
When i power off and back on the VCC of the ESP, this loop stops and the esp successfully boots.
on the other hand, pulling CHIP_PU down and up again doesn't get the ESP back to life.
over the time of my work i successfully recreated this issue in a few ways:
1. sometimes, after flashing the ESP8685 on my board, it enters this state. this is rather rare and of less concern for me, as i can simply retry the flashing process and normally it completes successfully.
2. spamming the chip_pu pin on and off repeatedly, causing a lot of consecutive boot attempts also might trigger this faulty behavior. again, this is rare and i haven't been able to get it to happen often with this approach.
3. finally, i open a serial communication port between the ESP and my PC, and perform a read_flash task using esptool on the cmd. as the esp half way through the read_flash process, i reset it via toggling the chip_pu pin. sometimes, this sequence of events also causes the boot-loop to occur, but again - not very often.
i am pretty sure that there is something wrong with the communication between the esp8685 and its internal NOR flash, but i couldn't figure out what the issue is.
unfortunately, the SPI communication lines between the esp8685 and int flash are internal to the chip and unavailable to examine, so i don't really know how to figure out what is going on.
i would kindly appreciate any help provided here.
thank you!