ESP32 S2 flashes but monitor shows invalid header: 0xffffff0f error

dininduwara
Posts: 4
Joined: Thu Aug 12, 2021 4:28 am

ESP32 S2 flashes but monitor shows invalid header: 0xffffff0f error

Postby dininduwara » Thu Aug 12, 2021 4:41 am

Hi!

I just ordered my first ESP32 S2 development board (ESP32-S2 Saola 1R Dev Kit featuring ESP32-S2 WROVER https://core-electronics.com.au/esp32-s ... rover.html)

However after flashing the hello_world program using the idf.py tool, I get the following error:

Code: Select all

ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x1f (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffff0f
invalid header: 0xffffff0f //spams this continuously
Image

The tool appears to flash everything correctly, but all I get "invalid header: 0xffffff0f" spammed on my console.

Any help would be appreciated. Thanks!

Sprite
Espressif staff
Espressif staff
Posts: 10617
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 S2 flashes but monitor shows invalid header: 0xffffff0f error

Postby Sprite » Thu Aug 12, 2021 10:02 am

How exactly are you flashing this? It feels like you only flashed the app, not the bootloader.

chegewara
Posts: 2505
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32 S2 flashes but monitor shows invalid header: 0xffffff0f error

Postby chegewara » Thu Aug 12, 2021 4:04 pm

How about strapping pins? It looks to me like you may have some pins in wrong state.

Code: Select all

rst:0x1 (POWERON),boot:0x1f (SPI_FAST_FLASH_BOOT)
Here is normal boot:

Code: Select all

rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)

dininduwara
Posts: 4
Joined: Thu Aug 12, 2021 4:28 am

Re: ESP32 S2 flashes but monitor shows invalid header: 0xffffff0f error

Postby dininduwara » Thu Aug 12, 2021 11:07 pm

How exactly are you flashing this? It feels like you only flashed the app, not the bootloader.
I'm flashing it via usb, following the documentation here: https://docs.espressif.com/projects/esp ... ep-by-step

dininduwara
Posts: 4
Joined: Thu Aug 12, 2021 4:28 am

Re: ESP32 S2 flashes but monitor shows invalid header: 0xffffff0f error

Postby dininduwara » Thu Aug 12, 2021 11:08 pm

How about strapping pins? It looks to me like you may have some pins in wrong state.

Code: Select all

rst:0x1 (POWERON),boot:0x1f (SPI_FAST_FLASH_BOOT)
Here is normal boot:

Code: Select all

rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
Sorry for the newb question, but how would I do that?

Sprite
Espressif staff
Espressif staff
Posts: 10617
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 S2 flashes but monitor shows invalid header: 0xffffff0f error

Postby Sprite » Fri Aug 13, 2021 2:38 am


I'm flashing it via usb, following the documentation here: https://docs.espressif.com/projects/esp ... ep-by-step
So just to check, you're using 'idf.py -p PORT flash', and not app_flash or some other idf.py command? Do you get any warnings while flashing?

dininduwara
Posts: 4
Joined: Thu Aug 12, 2021 4:28 am

Re: ESP32 S2 flashes but monitor shows invalid header: 0xffffff0f error

Postby dininduwara » Fri Aug 13, 2021 2:56 am

Thank you all for the responses.
After some tinkering I randomly managed to get it to work.

First I flashed, then held down the boot btn, press reset and then disconnect power and reconnect. I had tried all these steps previously, but it only worked in this order.

timc100
Posts: 2
Joined: Thu Nov 09, 2023 11:55 am

Re: ESP32 S2 flashes but monitor shows invalid header: 0xffffff0f error

Postby timc100 » Sat Jul 12, 2025 1:34 pm

To help anyone else facing the same problem, I bumped into this issue whilst trying to use up some ESP32 S2's on a project.

The reason is simply that there are some strapping pins that are defined in the manual, they are IO0, IO45 and IO46. These control how the ESP32 boots up.

IO45 controls the voltage used for the on-board SPI flash. By default its pulled down to logic 0 with a weak internal pull-down resistor, this setting makes the SPI power supply 3.3V, but when pulled high, it drops the SPI supply to 1.8V. This explains why the result is mostly F's as the bus is floating with the device not powered properly.

Also avoid IO26, which is the PSRAM CS pin. I've had problems with this before too.

The ability to use these pins depends on which varient of the ESP32 you have, since not all have external FLASH or have PSRAM fitted. When they are not fitted, then these pins can be used.

Its easy when switching between ESP32 chip versions to overlook this, as there is always a shortage of free IO pins in projects.

Who is online

Users browsing this forum: PetalBot, Qwantbot and 5 guests