Page 1 of 1
how to optimize the bootup time?
Posted: Thu Feb 28, 2019 9:46 am
by zhouhua
as I can measure.
when do nothing, app_main was executed about 1-2S after the reset .
how can I reduce this time? and how can I measure it priciselly?
Re: how to optimize the bootup time?
Posted: Thu Feb 28, 2019 12:18 pm
by ESP_igrr
* configure SPI flash to use QIO mode instead of DIO in menuconfig, "Serial Flasher Config"
* reduce log level for bootloader in "Bootloader config" and for application in "Component config > Log output" from "Info" to "Warning"
* if using PSRAM, consider disabling "Run memory test on SPI RAM initialization" option
These things tend to have the largest effect on bootup time. To measure, you can toggle some GPIO as the first thing in your app_main. Then connect EN pin and that GPIO to the two channels of an oscilloscope or a logic analyzer, configure the scope to trigger on the rising edge of "EN", then press and release "RST" button on the devboard. You should see EN going high, and some time later GPIO toggling.
Re: how to optimize the bootup time?
Posted: Thu Feb 28, 2019 12:34 pm
by mikemoy
@ESP_igrr, would you mind helping me to understand if QIO mode is faster, why isn't that the default mode ? Are there any disadvantages in using QIO mode ?
I found the answer if anyone else wanted to know.
https://github.com/espressif/esptool/wi ... es#summary
Re: how to optimize the bootup time?
Posted: Fri Mar 01, 2019 12:49 am
by ESP_igrr
Seems like you have found the answer. As in many cases, we use a more compatible (although possibly lower performance) behavior as a default and give options to optimize it later on.