Skip to content

Commit

Permalink
esp8266: Call spi_flash_attach() when stub runs
Browse files Browse the repository at this point in the history
Necessary if the ESP8266 has been woken from deep sleep,
when SPI flash is still powered down.

Closes espressif/esptool#351

Probably also the fix for espressif/esptool#380
  • Loading branch information
projectgus committed Dec 21, 2018
1 parent 4c3a9ae commit ac987c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flasher_stub/stub_flasher.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ void stub_main()
Can be overriden later by esptool.py. */
#ifdef ESP8266
SelectSpiFunction();

spi_flash_attach();
#else
uint32_t spiconfig = ets_efuse_get_spiconfig();
uint32_t strapping = REG_READ(GPIO_STRAP_REG);
Expand Down

0 comments on commit ac987c4

Please sign in to comment.