summaryrefslogtreecommitdiffstats
path: root/polycom_recv/reset.c
diff options
context:
space:
mode:
authorroot <root@no.no.james.local>2015-11-17 12:54:57 +0000
committerroot <root@no.no.james.local>2015-11-17 12:54:57 +0000
commitea4510dfe03f891340985594c4de15134e548853 (patch)
treee9f8df4d1c45a5781aea7d74b9973b5b92ca7d5f /polycom_recv/reset.c
parent7059fd523d6514d04e232f1d0acbc983856bd2e6 (diff)
downloadpolycom-ea4510dfe03f891340985594c4de15134e548853.tar.gz
polycom-ea4510dfe03f891340985594c4de15134e548853.tar.bz2
polycom-ea4510dfe03f891340985594c4de15134e548853.zip
recvr
Diffstat (limited to 'polycom_recv/reset.c')
-rw-r--r--polycom_recv/reset.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/polycom_recv/reset.c b/polycom_recv/reset.c
new file mode 100644
index 0000000..0068d07
--- /dev/null
+++ b/polycom_recv/reset.c
@@ -0,0 +1,20 @@
+#include "project.h"
+void ICACHE_FLASH_ATTR
+reset_init (void)
+{
+ struct rst_info *rtc_info = system_get_rst_info ();
+ os_printf ("reset reason: %x\n", rtc_info->reason);
+ if (rtc_info->reason == REASON_WDT_RST
+ || rtc_info->reason == REASON_EXCEPTION_RST
+ || rtc_info->reason == REASON_SOFT_WDT_RST)
+ {
+ if (rtc_info->reason == REASON_EXCEPTION_RST)
+ {
+ os_printf ("Fatal exception (%d):\n", rtc_info->exccause);
+ }
+ os_printf
+ ("epc1=0x%08x, epc2=0x%08x, epc3=0x%08x, excvaddr=0x%08x, depc=0x%08x\n",
+ rtc_info->epc1, rtc_info->epc2, rtc_info->epc3, rtc_info->excvaddr,
+ rtc_info->depc);
+ }
+}