espressif / ESP8266_NONOS_SDK

ESP8266 nonOS SDK
Other
926 stars 536 forks source link

ESP8266 firmware upgrade problem #225

Open shw19791031 opened 5 years ago

shw19791031 commented 5 years ago

Now, I have a trouble while upgrading ESP8266 firmware. I use DIO(not QIO) only SPI Flash. I wrote my own firmware download program according to esp8266-sdk_application_note_firmware_download_protocol_en.pdf. The process I have done are as follows.

  1. Sync Frame Send and receive ack(cmd 08)
  2. Configure SPI Params(cmd 0b) and receive ack
  3. Flash download start(cmd 02) and receive ack
  4. N * File Packet Send(cmd 03) and receive ack (3~4 steps are repeated for 3 times, as I wrote 3 files(eagle.flash.bin, eagle.irom0text.bin, esp_init_data_default_v08.bin)
  5. Flash Download Stop(cmd 04)

After all processes done, esp8266 module not boots correctly. As far as I can see, the field of SPI mode in File Header has changed to 0(QIO). Originally sent value was 2(DIO), but when I read SPI flash using another tool I can see 0(QIO). Would you please let me know why it has changed to QIO mode? And is there any other way to set it as DIO?

shw19791031 commented 5 years ago

PS: The contents of all 3 files in flash are same as original files, except SPI mode field in File Header.