Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    【FAQ】全志XR806芯片 系统异常重启如何解决?

    其它全志芯片讨论区
    xr806 faq 技术支持
    2
    4
    2375
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • q1215200171
      budbool LV 9 last edited by

      1. 问题背景
      产品在做稳定性测试,发现设备异常重启

      2. 问题描述
      用户应用在做长运压测,发现设备长运2~3天后会异常重启,log中未发现有代码奔溃现象。

      3. 问题分析
      系统重启,需要判断重启原因,系统中的重启原因有如下:

      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()]);
      

      通过插桩代码,就可以明确重启原因,导致看门狗喂狗不及时而重启。

      4. 解决办法
      (1)插桩代码,判断重启原因。
      (2)如果是看门狗重启,大部分情况下看门狗重启都是由于代码执行异常卡死,解决该问题,就先把看门狗关掉,接上JTAG等调试工具,程序执行异常,就会block住(不会重启),就可以利用jtag判断代码执行位置,进而找出异常点。

      Q 1 Reply Last reply Reply Quote Share 0
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • Q
        qqqlb LV 6 @q1215200171 last edited by

        @q1215200171 你好,请教一下,这个是uboot的代码还是内核的代码呢?t113支持吗

        q1215200171 1 Reply Last reply Reply Quote Share 0
        • q1215200171
          budbool LV 9 @qinlinbin last edited by

          @qinlinbin 理论上是不支持的吧

          Q 1 Reply Last reply Reply Quote Share 0
          • Q
            qqqlb LV 6 @q1215200171 last edited by

            @q1215200171 好的,谢谢

            1 Reply Last reply Reply Quote Share 0
            • Referenced by  q1215200171 q1215200171 
            • 1 / 1
            • First post
              Last post

            Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

            行为准则 | 用户协议 | 隐私权政策