feat(esp8266): Add software watch dog panic function

This commit is contained in:
Dong Heng
2018-05-25 20:32:15 +08:00
parent bc65f24c6a
commit ac6393b5b3
3 changed files with 103 additions and 6 deletions

View File

@ -38,9 +38,18 @@ void IRAM_ATTR panicHandler(void *frame)
"A14", "A15", "SAR", "EXCCAUSE"
};
extern int _Pri_3_NMICount;
/* NMI can interrupt exception. */
ETS_INTR_LOCK();
if (_Pri_3_NMICount == -1) {
void show_critical_info(void);
ets_printf("\nWatch dog triggle:\n\n");
show_critical_info();
}
for (x = 0; x < 20; x += 4) {
for (y = 0; y < 4; y++) {
ets_printf("%8s: 0x%08x ", sdesc[x + y], regs[x + y + 1]);