mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
Panic handler: Use same reset path as esp_restart(), disabling hardware
Closes #223 https://github.com/espressif/esp-idf/issues/223
This commit is contained in:
@@ -320,6 +320,8 @@ static void doBacktrace(XtExcFrame *frame)
|
||||
panicPutStr("\n\n");
|
||||
}
|
||||
|
||||
void esp_restart_noos() __attribute__ ((noreturn));
|
||||
|
||||
/*
|
||||
We arrive here after a panic or unhandled exception, when no OCD is detected. Dump the registers to the
|
||||
serial port and either jump to the gdb stub, halt the CPU or reboot.
|
||||
@@ -365,10 +367,7 @@ static void commonErrorHandler(XtExcFrame *frame)
|
||||
esp_gdbstub_panic_handler(frame);
|
||||
#elif CONFIG_ESP32_PANIC_PRINT_REBOOT || CONFIG_ESP32_PANIC_SILENT_REBOOT
|
||||
panicPutStr("Rebooting...\r\n");
|
||||
for (x = 0; x < 100; x++) {
|
||||
ets_delay_us(1000);
|
||||
}
|
||||
software_reset();
|
||||
esp_restart_noos();
|
||||
#else
|
||||
disableAllWdts();
|
||||
panicPutStr("CPU halted.\r\n");
|
||||
|
Reference in New Issue
Block a user