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
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.
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
I tried this solution on an example of the SDK and was able to activate the watchdog.
Thank you.
Daniele
Hello,
It is good that you managed to make it work,
Regards,
Estephania