KW36 - COP (WDG) is not working

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

KW36 - COP (WDG) is not working

1,230 次查看
dileep_divakara
Contributor I

Hi,

I am trying to enable watchdog in FRDM KW36, but its is not working, device is not reseting properly by watchdog/COP.

Here is the code snippet of initialization

{

      cop_config_t configCop;

      /*
      * configCop.enableWindowMode = false;
      * configCop.timeoutMode = kCOP_LongTimeoutMode;
      * configCop.enableStop = false;
      * configCop.enableDebug = false;
      * configCop.clockSource = kCOP_LpoClock;
      * configCop.timeoutCycles = kCOP_2Power10CyclesOr2Power18Cycles;
      */
      COP_GetDefaultConfig(&configCop);
      #if FSL_FEATURE_COP_HAS_LONGTIME_MODE
            configCop.timeoutMode = kCOP_ShortTimeoutMode;
      #endif
      COP_Init(SIM, &configCop);

}

 

I found that, After COP initialization, the value in the SIM->COPC register is not updating. It is always zero.

Anyone face this kind of issue? Please help me out to figure out the issue.

Thanks in advance

Dileep

标签 (3)
0 项奖励
回复
4 回复数

1,023 次查看
nava_daniele93
Contributor II

I have the same problem.

I also made the following attempts to make it work:   

1)

#ifndef DISABLE_WDOG
#define DISABLE_WDOG 0 // Was previously set to 1
#endif

2) 

config.timeoutCycles = kCOP_2Power5CyclesOr2Power13Cycles;
config.timeoutMode = kCOP_ShortTimeoutMode;
config.enableStop = true;
config.enableDebug = true;

To verify it during debug.

I'll keep you updated with new developments.

0 项奖励
回复

1,023 次查看
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

By any chance are you sure that the registers are not being modified in other functions ? Those registers are able to be written just one time every reset, if you check the SystemInit it is disabling it .

Hope that helps

Regards ,

Estephania

1,023 次查看
nava_daniele93
Contributor II

I tried this solution on an example of the SDK and was able to activate the watchdog.

Thank you.

Daniele

0 项奖励
回复

1,023 次查看
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

It is good that you managed to make it work,

Regards,

Estephania

0 项奖励
回复