-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rtc_get_reset_reason() doesn't work on C3 chipset (ESP32-C3) #8040
Comments
I've noticed SW_RESET on ESP32 as well. Not sure this is just a ESP32-C3 issue. |
Yes, that's correct. All these kinds of resets are software resets (from HW perspective). |
Great info! I'm updating my code to use this. Should we update the example to use this? |
So use esp_reset_reason() in place of rtc_get_reset_reason()? |
|
@igrr How does the dual core nature of the regular ESP32 play into this? esp_reset_reason() doesn't take an argument for which core. If one core crashes and restarts, would the panic handler then reboot the other core so effectively there's no notion of which core experience the issue? |
@bwjohns4 esp_reset_reason calls |
Closing, a solution is provided. |
Board
ESP32-C3
Device Description
It's a one-off board using a ESP32-C3 module. It's called NiceMCU-C3F_V1.0
Hardware Configuration
No
Version
v2.0.7
IDE Name
PlatformIO
Operating System
MacOS
Flash frequency
40MHz
PSRAM enabled
yes
Upload speed
115200
Description
rtc_get_reset_reason() returns the same reason and does not differentiate between ESP.restart(), null ptr reference (crash), or WDT timeout. It does recognize POWER_ON type startups, but the crashes and software restarts are all lumped together under value "3" of the RESET_REASON enum which I interpret as software reset. Maybe that's because the crashes are directed to the panic handler which actually just issues a software reset? Not sure...
Sketch
Other Steps to Reproduce
N/A
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: