1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-01 03:26:58 +03:00

Print stack on exception and soft WDT reset

This commit is contained in:
Ivan Grokhotkov
2015-06-19 19:42:59 +03:00
parent 66b480ab06
commit 703a9f3ef8
3 changed files with 131 additions and 4 deletions

View File

@ -129,9 +129,6 @@ void user_init(void) {
uart_div_modify(0, UART_CLK_FREQ / (74480));
system_rtc_mem_read(0, &resetInfo, sizeof(struct rst_info));
if(resetInfo.reason == REASON_WDT_RST || resetInfo.reason == REASON_EXCEPTION_RST) {
os_printf("Last Reset:\n - flag=%d\n - Fatal exception (%d):\n - epc1=0x%08x,epc2=0x%08x,epc3=0x%08x,excvaddr=0x%08x,depc=0x%08x\n", resetInfo.reason, resetInfo.exccause, resetInfo.epc1, resetInfo.epc2, resetInfo.epc3, resetInfo.excvaddr, resetInfo.depc);
}
struct rst_info info = { 0 };
system_rtc_mem_write(0, &info, sizeof(struct rst_info));