Hi,
the project we are working on requires waking up under certain conditions and gathering quite a lot of data in a very short time. The issue of boot up time has come up, it seems the booting process takes somewhere around a second (same for waking up from deep sleep) and light sleep is not implemented yet. From what I understand RTC core can not use SPI and all GPIO pins, correct? Is it possible to speed up the boot process somehow? Or set the ESP32 to a more power hungry state that it can wake up faster from?
Deep sleep wake up time
-
- Posts: 9739
- Joined: Thu Nov 26, 2015 4:08 am
Re: Deep sleep wake up time
Depending on the amount of code, you may use the deep sleep wake-up stub for this. This is essentially 8KiB of RTC memory where you can stash code that *immediately* gets executed when the CPU wakes from deep sleep. I'm not sure if 8KiB is enough to hold whatever you want to execute plus the data it writes, and doing WiFi or BT in that mode is pretty much a no go, but it may be enough to do what you want.
Re: Deep sleep wake up time
As well as Sprite's suggestion, the biggest speed boost in IDF boot time can come from disabling UART output.krajaan wrote:Is it possible to speed up the boot process somehow?
- Driving MTDO (GPIO15) low on reset will disable UART output from the bootloader (see ESP32 datasheet for more details).
- Setting the "Default log verbosity" (under menuconfig Component Configuration -> Log Output) to a high severity.
A third suggestion, the ULP can do some basic data gathering - but it's a much more restrictive programming environment than either IDF or using the wakeup boot stub.
Relevant docs: Angus
Re: Deep sleep wake up time
Thank you for the quick answers, setting QIO mode and the fastest SPI clock speed made a huge difference! I'll have to time boot up and waking up from deep sleep to see if I need to speed things up even further. I'll try to remember to post the numbers once I do.
I have to say the community (both documentation and support-wise) has been amazing so far.
I have to say the community (both documentation and support-wise) has been amazing so far.
Re: Deep sleep wake up time
We did some measurements here, and the time spent between deep sleep wakeup (triggered by the ULP, for example) and entry into app_main is around 230ms, with default flash settings (40MHz, DIO mode) and all kinds of debugging output disabled (per comment from Angus above).
Re: Deep sleep wake up time
We just finished doing some tests as well:
Running at 240 MHz in QIO SPI mode clocked at 80 Mhz a boot from deep sleep took around 138ms with UART output at boot fully disabled.
Disabling all logging but keeping the UART disable pin high only increased boot time by around 20 ms.
Interestingly enough we found that booting at 80 MHz with SPI flash configured to be DIO at 40 MHz coming out of deep sleep only took 180 ms while running the main clock at 240 MHz and leaving flash at 40 MHz in DIO mode lengthened the process by only 40 ms.
System clock at 240 MHz vs 80 MHz barely had any impact while 80 MHz QIO vs 40 MHz DIO was a 40 ms difference, as state above.
Running at 240 MHz in QIO SPI mode clocked at 80 Mhz a boot from deep sleep took around 138ms with UART output at boot fully disabled.
Disabling all logging but keeping the UART disable pin high only increased boot time by around 20 ms.
Interestingly enough we found that booting at 80 MHz with SPI flash configured to be DIO at 40 MHz coming out of deep sleep only took 180 ms while running the main clock at 240 MHz and leaving flash at 40 MHz in DIO mode lengthened the process by only 40 ms.
System clock at 240 MHz vs 80 MHz barely had any impact while 80 MHz QIO vs 40 MHz DIO was a 40 ms difference, as state above.
Re: Deep sleep wake up time
Hi @all
there is a table that report the wakeup time from boot or deep sleep for ESP32-C3?
what should be the expected wake up time? reading https://docs.espressif.com/projects/esp ... speed.html i don't find eny refernence time. I'm expecting that the boot and app after a deep sleep can take 1-2 msec. is it?
there is a table that report the wakeup time from boot or deep sleep for ESP32-C3?
what should be the expected wake up time? reading https://docs.espressif.com/projects/esp ... speed.html i don't find eny refernence time. I'm expecting that the boot and app after a deep sleep can take 1-2 msec. is it?
Who is online
Users browsing this forum: Tanio_LLLLLL, TomAatjes and 83 guests