You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This problem can be reproduced by running AXP2101_Sleep_Example.ino on ESP32-H2. Switch 'Core Debug Level' to 'Verbose' and it should show something like
Espressif defines a PMU variable declared as extern for some of their SOCs (in my case it was the ESP32H2):
https://github.com/espressif/esp-idf/blob/1cb4f3468d64c9e8bde196b15df37cbcd4b31395/components/soc/esp32h2/include/soc/pmu_struct.h#L761
This code is precompiled into the esp32-arduino-lib library installed by Arduino. If you run the example programs on these SOCs, everything will get messed up due to the global PMU variable.
I encountered this problem when debugging the sleep function of ESP32-H2. It took me some time to troubleshoot this issue because the compiler doesn't directly prompt the error.
The sleep-related functions of ESP32-H2 will reference the PMU variable, which will cause the sleep function to not run properly and cause core panic.
https://github.com/espressif/esp-idf/blob/1cb4f3468d64c9e8bde196b15df37cbcd4b31395/components/esp_hw_support/sleep_wake_stub.c#L71-L74
https://github.com/espressif/esp-idf/blob/1cb4f3468d64c9e8bde196b15df37cbcd4b31395/components/esp_hw_support/sleep_modes.c#L2060
This problem can be reproduced by running AXP2101_Sleep_Example.ino on ESP32-H2. Switch 'Core Debug Level' to 'Verbose' and it should show something like
and reboot
The text was updated successfully, but these errors were encountered: