how to optimize the bootup time?

zhouhua
Posts: 1
Joined: Thu Feb 28, 2019 9:08 am

how to optimize the bootup time?

Postby zhouhua » Thu Feb 28, 2019 9:46 am

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?

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: how to optimize the bootup time?

Postby ESP_igrr » Thu Feb 28, 2019 12:18 pm

* 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.

mikemoy
Posts: 626
Joined: Fri Jan 12, 2018 9:10 pm

Re: how to optimize the bootup time?

Postby mikemoy » Thu Feb 28, 2019 12:34 pm

@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

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: how to optimize the bootup time?

Postby ESP_igrr » Fri Mar 01, 2019 12:49 am

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.

Who is online

Users browsing this forum: forrest and 88 guests