Skip to content

arch/risc-v/esp32[-c3|-c6|-h2]: Add auto light sleep#18694

Merged
xiaoxiang781216 merged 3 commits intoapache:masterfrom
eren-terzioglu:feature/esp_riscv_wifi_wakeup
Apr 10, 2026
Merged

arch/risc-v/esp32[-c3|-c6|-h2]: Add auto light sleep#18694
xiaoxiang781216 merged 3 commits intoapache:masterfrom
eren-terzioglu:feature/esp_riscv_wifi_wakeup

Conversation

@eren-terzioglu
Copy link
Copy Markdown
Contributor

@eren-terzioglu eren-terzioglu commented Apr 9, 2026

Summary

  • Docs/risc-v/esp32[-c3|-c6|-h2]: Add autopm docs

Add autopm docs for risc-v based Espressif devices

  • boards/risc-v/esp32[-c3|-c6|-h2]: Add autopm defconfig

Add autopm defconfig for risc-v based Espressif devices

  • arch/risc-v/esp32[-c3|-c6|-h2]: Add auto sleep

Add auto sleep for risc-v based Espressif devices

Impact

Impact on user: Auto light sleep option added

Impact on build: No

Impact on hardware: No

Impact on documentation: autopm configuration docs added

Impact on security: No

Impact on compatibility: No

Testing

Building

Used configs:

esp32c3-devkit:autopm
esp32c6-devkitc:autopm
esp32h2-devkit:autopm

Command to build:

make -j distclean && ./tools/configure.sh esp32c6-devkitc:autopm && make -j && make download ESPTOOL_PORT=/dev/ttyUSB0 ESPTOOL_BAUD=921600 ESPTOOL_BINDIR=./

Running

Defconfig enables UART wakeup and WiFi wakeup (on supported devices) by default.

Used commands to test power consumption during WiFi operation:

ifup wlan0
wapi psk wlan0 WIFI_PASS 3
wapi essid wlan0 WIFI_SSID 1
renew wlan0

ping 8.8.8.8

For UART wakeup, sleep logs and power consumption checked

Results

System logs (Power Related debug options enabled):

...
NuttShell (NSH) NuttX-10.4.0
esp_pm_skip_light_sleep: UART wakeup still within guard window
nsh> esp_pm_skip_light_sleep: UART wakeup still within guard window
esp_pm_skip_light_sleep: UART wakeup still within guard window
nsh> esp_pm_skip_light_sleep: UART wakeup still within guard window
...

Idle system power consumption drops from 90-100 to 27-35 mA

During ping operation power consumption should drop from 90-100mA to 30-40mA

Special thanks to @tmedicci for his help

@github-actions github-actions bot added Area: Documentation Improvements or additions to documentation Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Arch: xtensa Issues related to the Xtensa architecture Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. Board: risc-v labels Apr 9, 2026
fdcavalcanti
fdcavalcanti previously approved these changes Apr 9, 2026
xiaoxiang781216
xiaoxiang781216 previously approved these changes Apr 9, 2026
@eren-terzioglu eren-terzioglu force-pushed the feature/esp_riscv_wifi_wakeup branch from 9cfca8a to 370b996 Compare April 10, 2026 07:17
tmedicci and others added 3 commits April 10, 2026 09:23
Add auto sleep for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
Add autopm defconfig for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
Add autopm docs for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
@simbit18 simbit18 requested review from acassis and linguini1 April 10, 2026 09:07
@xiaoxiang781216 xiaoxiang781216 merged commit c97a785 into apache:master Apr 10, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Arch: xtensa Issues related to the Xtensa architecture Area: Documentation Improvements or additions to documentation Board: risc-v 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