This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] LP-AM243:看门狗实现、尤其是热复位和调试失速模式

Guru**** 2482105 points
Other Parts Discussed in Thread: SYSCONFIG

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1555220/lp-am243-watchdog-implementation-particularly-warm-reset-and-debug-stall-mode

器件型号:LP-AM243
主题:SysConfig 中讨论的其他器件

工具/软件:

它可能关心的对象。

我目前正在测试 WDT 的触发热复位模式。 由于我的看门狗在特定时间段内对您可以多次宠物的阶段做出了很好的响应、因此我尝试通过让程序运行而不妨碍看门狗的方式来进行测试、预计电路板将触发热复位并退出调试器。 但是、它不会绕过程序、我注意到我的 SysConfig 在默认情况下会使用此功能。  

    debugStallMode  = WATCHDOG_DEBUG_STALL_ON
如何在 SysConfig 中进行更改、以及是否能够通过此代码使电路板复位看门狗  
void CWDT::runWarmResetDemo(uint32_t phase1_ms、uint32_t pet_period_ms、bool 管理驱动程序)
  IF(管理驱动程序)
  {
    drivers_open()
    BOARD_DRIVERSOpen ();
  }
  logAndClearResetCause ();
  DebugP_assert (gWatchdogHandle[CONFIG_WDT0]!= NULL);

  DebugP_log(“===== WDT 热复位演示====\r\n“)
  DebugP_log(“Phase 1:%u ms 检测%u 毫秒...\r\n“、phase1_ms、pet_period_ms);

  Uint64_t t0 = ClockP_getTimeUsec()
  while ((ClockP_getTimeUsec ()- t0)<(static_cost <uint64_t>(phase1_ms)* 1000ULL))
  {
    WATCHDOG_CLEAR (gWatchdogHandle[CONFIG_WDT0]);
    ClockP_usleep (static_cost <uint32_t>(pet_period_ms)* 1000u);
  }

  DebugP_LOG(“Phase 2:停止服务;预计在~μ s 超时后进行热复位……\r\n“)

  /*现在只是空闲并让 WDT 过期;电路板将复位、因此永远不会返回*/
  while (1)
  {
    ClockP_USleep (2500000U);// 2500ms
  }

  /*此处没有 close();我们在重置前从未到达它*/
}

/*为 MCU 域和主域读取、打印和清除热复位原因位。 */
void CWDT::logAndClearResetCause ()
  uint32_t MCU = SOC_getWarmResetCauseMcuDomain()
  uint32_t main = SOC_getWarmResetCauseMainDomain()

  DebugP_LOG(“复位原因 MCU: 0x%08x\r\n“、MCU);
  DebugP_log(“复位原因 main:0x%08x\r\n“、main);

  /*清除锁存位、以便下一次引导显示新的原因*/
  SoC_clearResetCauseMainMcuDomain (MCU | MAIN);
}