请问全志XR806芯片系统异常重启应该如何解决呢?
本回答来源链接:全志xr806芯片-系统异常重启如何解决
系统中的重启原因有如下:
typedef enum {
SYS_POWERON = 0, //硬件上电启动
SYS_WATCHDOG_CHIP_RST = 1, //看门狗复位重启,包含整个系统
SYS_WATCHDOG_CPU_RST = 2, //看门狗复位重启,仅CPU
SYS_REBOOT = 6, //执行reboot命令重启
SYS_CPU_RST = 7, //cpu异常复位启动
SYS_NVIC_RST = 8, //中断异常重启
}SystemStartupState;
插桩代码,判断重启原因,下面是示例代码:
const char* startup_state_str[] = {"powerOn", "wdgSocRst", "wdgCpuRst", "sleep",
"standby", "hibernation", "reboot", "cpuRst","nvicRst"};
printf("startup state: %s\n", startup_state_str[SysGetStartupState()]);