Reasons for RTCWDT_RTC_RESET
Posted: Tue Jan 03, 2023 3:55 pm
Hi!
I have a code on an ESP32 that randomly crashes with the following reset reason: RTCWDT_RTC_RESET (rtc_get_reset_reason(0)==16).
Here I found more information about this reboot reason:
https://docs.espressif.com/projects/esp ... og-timeout
Visual Studio Code shows me, the Serial.println-Command grayed out. Also there is no output of this line in serial monitor. So i don't think, my code activates this option anywhere.
So I ask myself, how could the RTC watchdog trigger a restart a few hours after the boot up, when it should be disabled for hours? Are there more errors, triggering the error code 16?
Best regards
Julian
I have a code on an ESP32 that randomly crashes with the following reset reason: RTCWDT_RTC_RESET (rtc_get_reset_reason(0)==16).
Here I found more information about this reboot reason:
https://docs.espressif.com/projects/esp ... og-timeout
As I understand this RTC watchdog, it monitors the start up of the chip and disables itself before my main code (setup() and loop()) is run. I don't use the mentioned option to enable the watchdog again. I add the following code, to verify it:The RTC watchdog is used in the startup code to keep track of execution time and it also helps to prevent a lock-up caused by an unstable power source. [... It is] finally disabled right before the app_main() call. There is an option CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE which prevents the RTC watchdog from being disabled before app_main. [...]
Code: Select all
#ifdef CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE
Serial.println("Config activated!");
#endif
So I ask myself, how could the RTC watchdog trigger a restart a few hours after the boot up, when it should be disabled for hours? Are there more errors, triggering the error code 16?
Best regards
Julian