I used Watchdog timer in KW36 ble temp sens example. I can successfully use Watchdog if
#define cPWR_UsePowerDownMode 0
and clock source as either 'kCOP_LpoClock' or 'kCOP_McgIrClock'.
The COP reset MCU immediately after calling 'COP_Init()' function with source clock as either 'kCOP_OscErClock' or 'kCOP_BusClock' even if powerDownMode enabled.
The COP reset didn't occurred if
#define cPWR_UsePowerDownMode 1
with clock source as either 'kCOP_LpoClock' or 'kCOP_McgIrClock'.
The dafault settings is
void COP_GetDefaultConfig(cop_config_t *config)
{
assert(config);
config->enableWindowMode = false;
#if defined(FSL_FEATURE_COP_HAS_LONGTIME_MODE) && FSL_FEATURE_COP_HAS_LONGTIME_MODE
config->timeoutMode = kCOP_ShortTimeoutMode;
config->enableStop = true;
config->enableDebug = true;
#endif /* FSL_FEATURE_COP_HAS_LONGTIME_MODE */
config->clockSource = kCOP_BusClock;
config->timeoutCycles = kCOP_2Power10CyclesOr2Power18Cycles;
}
From the reference manual i understand i can use any of these clocks. I don't see the reason why i can't use source clock as either 'kCOP_OscErClock' or 'kCOP_BusClock'.
Also in reference manual :
Regardless of the clock selected, the COP is disabled when the chip enters a VLLSx
mode. Upon a reset that wakes the chip from the VLLSx mode, the COP is reinitialized
and enabled as for any reset.
Then why when module wakes for advertisement it wouldn't get reset?
Please anyone clarify these issues!
Best Regards,
Nidhin