summaryrefslogtreecommitdiffstats
path: root/polycom_recv/reset.c
blob: 0068d07edc00dc3452e15001e3d0ed1b3c140356 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);
    }
}