Skip to content

Conversation

@eren-terzioglu
Copy link
Contributor

Summary

This PR fixes exception issue which is happening PM_NORMAL state count value. When DEBUG_ASSERTIONS and PM enabled, system raises an exception after recovering back from light sleep (PM_STANDBY mode).

  • arch/xtensa/esp32[-|-s3]: Fix exception issue when pm active

Fix exception issue when PM and DEBUG_ASSERTIONS enabled for esp32 and esp32s3

Impact

Impact on user: Yes, exception bug when DEBUG_ASSERTIONS enabled with PM on esp32 and esp32s3 fixed

Impact on build: No

Impact on hardware: No

Impact on documentation: No

Impact on security: No

Impact on compatibility: No

Testing

Building

To reproduce the issue this command used:

make -j distclean && ./tools/configure.sh esp32s3-devkit:pm && kconfig-tweak -e DEBUG_FEATURES && kconfig-tweak -e DEBUG_ASSERTIONS && make olddefconfig -s -j && make ESPTOOL_BINDIR=./ -s -j && make download ESPTOOL_PORT=/dev/ttyUSB0 ESPTOOL_BAUD=921600 ESPTOOL_BINDIR=./

Running

To have exception this commands applied:

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

Results

After this commands, device should get into light-sleep mode and after some time this exception was getting triggered. It should not happen again with this MR.

Fix exception issue when PM and DEBUG_ASSERTIONS enabled for esp32 and esp32s3.
This error happens due to PM system workflow, when system gets into sleep-modes with
removing PM_NORMAL count, system is raising an exception for not having
enough number of PM_NORMAL state count if DEBUG_ASSERTIONS enabled.

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
@github-actions github-actions bot added Arch: xtensa Issues related to the Xtensa architecture Size: S The size of the change in this PR is small labels Oct 23, 2025
@linguini1 linguini1 merged commit 7340688 into apache:master Oct 23, 2025
14 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 Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants