Skip to content

Commit

Permalink
esp32: Skip validation of image on boot from deepsleep.
Browse files Browse the repository at this point in the history
sdkconfig.base: Add CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP=y.
This reduces time to boot from deepsleep by at least 200ms and can
provide significant power savings for deepsleep-based battery
applications.

docs/library/esp32.rst: Add note cautioning not to enter deepsleep after
changing the boot partition, without first performing a hard reset.

Signed-off-by: Glenn Moloney <glenn.moloney@gmail.com>
  • Loading branch information
glenn20 authored and dpgeorge committed Sep 5, 2023
1 parent 5e50593 commit 0bafdaf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/library/esp32.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ methods to enable over-the-air (OTA) updates.

Sets the partition as the boot partition.

.. note:: Do not enter :func:`deepsleep<machine.deepsleep>` after changing
the OTA boot partition, without first performing a hard
:func:`reset<machine.reset>` or power cycle. This ensures the bootloader
will validate the new image before booting.

.. method:: Partition.get_next_update()

Gets the next update partition after this one, and returns a new Partition object.
Expand Down
1 change: 1 addition & 0 deletions ports/esp32/boards/sdkconfig.base
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR=y

# Bootloader config
CONFIG_BOOTLOADER_LOG_LEVEL_WARN=y
CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP=y

# Change default log level to "ERROR" (instead of "INFO")
CONFIG_LOG_DEFAULT_LEVEL_INFO=n
Expand Down

0 comments on commit 0bafdaf

Please sign in to comment.