Skip to content

arch/xtensa/esp32[-s2|-s3]: Refactor PM support - #17414

Merged
xiaoxiang781216 merged 3 commits into
apache:masterfrom
eren-terzioglu:feature/esp_xtensa_sleep_modes
Dec 1, 2025
Merged

arch/xtensa/esp32[-s2|-s3]: Refactor PM support#17414
xiaoxiang781216 merged 3 commits into
apache:masterfrom
eren-terzioglu:feature/esp_xtensa_sleep_modes

Conversation

@eren-terzioglu

Copy link
Copy Markdown
Contributor

Summary

  • Documentation/xtensa/esp32[-s2]: Add PM docs

Add PM docs for esp32s2

  • boards/xtensa/esp32[-s2|-s3]: Refactor PM board layer

Refactor PM board layer for Xtensa based Espressif devices

  • arch/xtensa/esp32[-s2|-s3]: Refactor PM support

Refactor PM modes for Xtensa based Espressif devices

Impact

Impact on user: Yes, users can use light sleep and deep sleep with different wakeup modes (ext0, gpio, ext1)

Impact on build: No

Impact on hardware: PM mode supported for esp32s2

Impact on documentation: Yes, newly added config docs added

Impact on security: No

Impact on compatibility: No

Testing

Building

Used configs:

esp32s2-saola-1:pm
esp32s3-devkit:pm
make -j distclean && ./tools/configure.sh esp32s2-saola-1:pm && make -j && make download ESPTOOL_PORT=/dev/ttyUSB0 ESPTOOL_BAUD=921600 ESPTOOL_BINDIR=./

Running

To let device into light-sleep mode, these commands applied:

nsh> pmconfig relax idle
nsh> pmconfig relax normal
nsh> pmconfig relax normal

To let device into deep-sleep mode, these commands applied:

nsh> pmconfig relax standby
nsh> pmconfig relax idle
nsh> pmconfig relax normal
nsh> pmconfig relax normal

Results

After these commands applied, device will stop responding to nsh and after a while it will start responding. On deep sleep, device should reset with DSLEEP or SLEEP_WAKEUP reset reason

Refactor PM modes for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
Refactor PM board layer for Xtensa based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
Add PM docs for esp32s2

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
@github-actions github-actions Bot added Area: Documentation Improvements or additions to documentation Arch: xtensa Issues related to the Xtensa architecture Board: xtensa Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. labels Dec 1, 2025
@xiaoxiang781216
xiaoxiang781216 merged commit f90dcde into apache:master Dec 1, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: xtensa Issues related to the Xtensa architecture Area: Documentation Improvements or additions to documentation Board: xtensa Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants