Open InRiPa opened 4 days ago
Hi @InRiPa, We haven't implemented any sleep-related functionality in QEMU yet. The exception (LoadStorePIFAddrError) happens because the sleep driver in IDF is trying to write to a peripheral which isn't defined in the emulator.
Since from software perspective a deep sleep is almost like a software reset (just with a variable amount of time until the next boot), I would recommend replacing the deep sleep entry with a call to esp_restart, when building for QEMU.
Checklist
How often does this bug occurs?
always
Expected behavior
Getting into deep sleep with a timer setup previously.
Actual behavior (suspected bug)
Guru Meditation Error: Core 1 panic'ed (LoadStorePIFAddrError). Exception was unhandled.
Error logs or terminal output
Steps to reproduce the behavior
Project release version
ESP-IDF v5.3-357-g6568f8c553
System architecture
Intel/AMD 64-bit (modern PC, older Mac)
Operating system
Linux
Operating system version
FROM espressif/idf:release-v5.3
Shell
sh
Additional context
I'm not sure, maybe I'm using the deep sleep wrongly, but I also checked some online examples, and the setup seemed pretty much the same. Following the minimal example for a classic esp32.
esp_deep_sleep_start
./opt/esp/tools/qemu-xtensa/esp_develop_9.0.0_20240606/qemu/bin/qemu-system-xtensa