Watchdog (COP) problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Watchdog (COP) problem

903 Views
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.

Labels (1)
1 Reply

699 Views
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.