https://libs.toit.io/#reset-reason(0%2C0%2C0%2C)
Greetings, is there example code on how to use the reset-reason function in combination with watchdog?
f
floitsch
02/26/2025, 1:28 PM
I don't think so, but you should just be able to write:
Copy code
import esp32
main:
if esp32.reset-reason == ESP-RST-WDT:
print "rebooted due to watchdog"
floitsch
02/26/2025, 1:28 PM
Maybe it's
ESP-RST-TASK-WDT
.
floitsch
02/26/2025, 1:28 PM
I will add more documentation to the constants in the esp32 library.