I’m trying to optimize the boot time of my ESP32-S3 board. I’m working on an application that will not be able to benefit from sleep due to size constraints requiring a very small battery (I’m not the hardware guy, I don’t have a full understanding of why this is). Ideally, when the user activates the device there will be no perceptible delay before it starts to function (which will involve lighting LEDs and playing some audio). As such my target is for the device to respond in under 100ms.
I was able to find some good information on this in the Espressif docs, including this example config: https://github.com/espressif/esp-idf/blob/b4268c874a4/examples/system/startup_time/sdkconfig.defaults
Problem is, using ESP-IDF is a bit daunting. I would much prefer to use PlatformIO with the Arduino framework if possible.
To test boot time, I’m using a modified “blink” example program. I’ve connected one Oscilloscope probe to the 3.3v rail of my power source, and another scope probe to my LED which is connected to pin 21 on my board. I’m measuring the interval between the power rail going high, and pin 21 going high. I’m testing with an Unexpected Maker ProS3 dev board, though the final application will use a smaller custom board.
Using PlatformIO and a modified Arduino blink example, I’m measuring over 1000ms from power to LED on.
I went through all the hassle of getting ESP-IDF running and was able to run the experiment using a modified version of Espressif’s blink example. This had an interval of only 366ms. I then applied the configurations from the link above, and got it down to only 86ms!
But… using PlatformIO/Arduino is a lot simpler and easier than IDF. Even running the espidf framework inside PlatformIO would be a bit easier to work with, but I didn’t have any luck getting that to work. It also seems that even if you do that, you can’t configure things the same way you can when using IDF on its own.
Unfortunately the only optimization advice I can find that seems to apply to PlatformIO is this:
build_flags = -DCORE_DEBUG_LEVEL=0
But this has no measurable effect.
Does anyone know if there are ways to similarly optimize when using PlatformIO? Does anyone know if the 1000+ms boot time is unavoidable with Arduino framework, or is it possible to get below 100ms?
Bonus points: Anything I can do to get the boot time even lower.