OVMS3-idf/examples/system/deep_sleep
KonstantinKondrashov 83db8d402b examples: Add the fast wakeup option for deep sleep examples
The CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP option is enabled
by default for the following examples:
 - system/deep_sleep,
 - system/ulp,
 - system/ulp_adc.
2019-08-21 11:44:37 +00:00
..
main tools: Mass fixing of empty prototypes (for -Wstrict-prototypes) 2019-08-01 16:28:56 +07:00
CMakeLists.txt cmake: make main a component again 2018-09-11 09:44:12 +08:00
Makefile add deep sleep wake up example 2017-02-22 18:40:31 +08:00
README.md examples: Add the fast wakeup option for deep sleep examples 2019-08-21 11:44:37 +00:00
sdkconfig.defaults examples: Add the fast wakeup option for deep sleep examples 2019-08-21 11:44:37 +00:00

Example: deep sleep

This example illustrates usage of deep sleep mode and various wakeup sources.

The following wake up sources are configured:

  • Timer: wake up the chip in 20 seconds
  • EXT1: wake up the chip if any of the two buttons are pressed (GPIO25, GPIO26)
  • Touch: wake up the chip if any of the touch pads are pressed (GPIO32, GPIO33)
  • ULP: wake up when the chip temperature changes by more than ~5 degrees Celsius (this value hasn't been characterized exactly yet).

In this example, the CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP Kconfig option is used, which allows you to reduce the boot time of the bootloader during waking up from deep sleep. The bootloader stores in rtc memory the address of a running partition and uses it when it wakes up. This example allows you to skip all image checks and speed up the boot.