mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 12:14:32 +02:00
Bugfix - Panic Handler not halting when running on both cores
Bug occurs when core dump destination in menuconfig is set to flash. When programme crashes, xt_unhandled_exception or panicHandler will both trigger commonErrorHandler. commonErrorHandler calls esp_core_dump_to_flash which will attempt to use DPORT functions and hang due to trying to a stall and already stalled processor (already stalled in xt_unhandled_exception and panicHandler). Program will eventually be rebooted when wdt expires. Added esp_dport_access_int_deinit after calls to haltOtherCore() so that DPORT functions don't try to halt and already halted cpu hence preventing hang. Fixes TW#12944 https://github.com/espressif/esp-idf/issues/646
This commit is contained in:
@@ -197,6 +197,7 @@ void panicHandler(XtExcFrame *frame)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
haltOtherCore();
|
haltOtherCore();
|
||||||
|
esp_dport_access_int_deinit();
|
||||||
panicPutStr("Guru Meditation Error: Core ");
|
panicPutStr("Guru Meditation Error: Core ");
|
||||||
panicPutDec(core_id);
|
panicPutDec(core_id);
|
||||||
panicPutStr(" panic'ed (");
|
panicPutStr(" panic'ed (");
|
||||||
@@ -244,6 +245,7 @@ void panicHandler(XtExcFrame *frame)
|
|||||||
void xt_unhandled_exception(XtExcFrame *frame)
|
void xt_unhandled_exception(XtExcFrame *frame)
|
||||||
{
|
{
|
||||||
haltOtherCore();
|
haltOtherCore();
|
||||||
|
esp_dport_access_int_deinit();
|
||||||
if (!abort_called) {
|
if (!abort_called) {
|
||||||
panicPutStr("Guru Meditation Error of type ");
|
panicPutStr("Guru Meditation Error of type ");
|
||||||
int exccause = frame->exccause;
|
int exccause = frame->exccause;
|
||||||
|
Reference in New Issue
Block a user