ESP8266 Boot
Boot Options
| GPIO 0 | GPIO 2 | GPIO 15 (MTDO) ----------------------------------|--------|--------|--------- Flash Startup (Normal) | 1 | 1 | 0 UART Download Mode (Programming) | 0 | 1 | 0 SD-Card Boot | 0 | 0 | 1
Only use Flash Boot and Download Mode
| GPIO 0 ----------------------------------|-------- Flash Startup (Normal) | 1 UART Download Mode (Programming) | 0
Header text | Header text | Header text |
---|---|---|
ESP-12F |
|
GPIO0 for mode |
ESP-12S | - | GPIO0 for mode |
Enter Into Flash Mode
- Most development board has auto enter into flash mode circuits, more commerial products do not really need this.
- Pull GPIO 0 of ESP8266 before power up or reboot to enter into flash mode. -> So simply hold down GPIO 0 and press once reset will enter into flash mode manully.
- Connect 3.3V/GND/TXD=>RXD/RXD->TXD to target, recommand USB-TTL downloader here
Boot Debug
- Open arduino IDE, and set baud rate to 74880 on serial, can find esp8266 debug info.
ets Jan 8 2013,rst cause:1, boot mode:(3,6)
load 0x4010f000, len 1384, room 16 tail 8 chksum 0xef csum 0xef csum err ets_main.c
- reset causes:
0: 1: normal boot 2: reset pin 3: software reset 4: watchdog reset
- boot device:
0: 1: ram 3: flash
Flash Error Log
- flash size is not correctly selected, in this case should be 16Mbit-C1 instead of 32Mbit
mismatch map 5,spi_size_map 4 system_partition_table_regist fail
Incorrect flash mode
ets Jan 8 2013,rst cause:1, boot mode:(3,7)
load 0x4010f000, len 1384, room 16 tail 8 chksum 0xef csum 0xef csum err ets_main.c
- Fix:esptool.py write_flash 0x0 Yxxxx.bin
- change to below, add dout SPI flash mode
esptool.py write_flash --flash_mode dout 0x0 Yxxxx.bin
Debug
Hardware Check
- Try to swap TXD and RXD in case it is wrong
- Buttons should be hold down or pressed firmly and properly to make the good connection, it is too tiny button
- On module status Blue LED will blink once on reset
- USB-TTL Compatible with 5V TXD RXD signal, for our relay boards, wiring should be 5V, GND, TXD and RXD. Recommanded USB-TTL debugger boards are CP2102, speed up to 15000000 (Some other boards only do 115200)
Software Correct Boot Mode Output
- Correct flash mode output on arduino baudrate 748800:
ets Jan 8 2013,rst cause:2, boot mode:(1,7)
- Correct normal boot mode output
ets Jan 8 2013,rst cause:2, boot mode:(3,7)