Watchdog (COP) problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Watchdog (COP) problem

2,050 次查看
mihakrejan
Contributor II

Hello,

I have trouble enabling watchdog (COP).

I am using KW01_Connectivity_Software_1.0.0.

Source code is:

  cop_config_t copInit =
  {
      .copWindowModeEnable = (uint8_t)false,
#if FSL_FEATURE_COP_HAS_LONGTIME_MODE
      .copTimeoutMode      = kCopShortTimeoutMode,
      .copStopModeEnable   = (uint8_t)false,
      .copDebugModeEnable  = (uint8_t)false,
#endif
      .copClockSource      = kCopLpoClock,
      // COP reset after about 1s.
      .copTimeout          = kCopTimeout_short_2to10_or_long_2to18
  };

  COP_DRV_Init(0, &copInit);

However watchdog is not enabled: COP_DRV_IsRunning(0) always returns FALSE  and MCU reset does not occur.

I have "#define DISABLE_WDOG 0" in app_preinclude.h

I have even try to write value 0x0C directly to SIM->COPC in system_MKW01Z4.c, but still no luck.

标签 (1)
1 回复

1,846 次查看
mihakrejan
Contributor II

I have resolved issue. Watchdog could not be enabled while debugging and once the watchdog is disabled it could not be enabled until power is disconnected.