ESP8266 SDK reboot loops with cause:2, boot mode:(3,6)

Recently I’ve been building and flashing some projects to the ESP8266 directly using the Espressif SDK for development (not Arduino).

After changing the flash mode, I was still in a reboot loop, but was seeing “rf_cal[0] !=0x05,is 0xFF” just before reboot. This is a known issue that is resolved by reflashing the “init data” (esp_init_data_default.bin) as described here: (scroll to “SDK Init Data”).

The first thing to try is erase the flash before flashing your code: --port <serial-port-of-ESP8266> erase_flash

If that doesn’t work, flashing the “init” data will likely fix the problem: --port <serial-port-of-ESP8266> write_flash -fm <flash-mode> <flash_addr> esp_init_data_default.bin

Where <flash_mode> would be something like “dout”, “dio” or “qio” (use “dout” for ESP8285, “dio” or “qio” for ESP-12)

and <flash_addr> is determined based on flash size and this table:

  • 0x7c000 for 512 kB, modules like most ESP-01, -03, -07 etc.
  • 0xfc000 for 1 MB, modules like ESP8285, PSF-A85, some ESP-01, -03 etc.
  • 0x1fc000 for 2 MB
  • 0x3fc000 for 4 MB, modules like ESP-12E, NodeMCU devkit 1.0, WeMos D1 mini
  • 0x7fc000 for 8 MB
  • 0xffc000 for 16 MB, modules like WeMos D1 mini pro


This entry was posted in ESP8266, Technical. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s