I am working on watchdog timer of MKL26Z256VLH4, I have flashed cop sample application and it worked perfectly fine. but when I included cop function in my current program, COP is refreshing but it is not resetting after the loopcount is finished.
/* Check if WDOG reset occurred */
if (RCM_GetPreviousResetSources(RCM) & kRCM_SourceWdog)
{
PRINTF("Reset due to COP timeout\r\n");
COP_Disable(SIM);
PRINTF("COP example ends!\r\n");
}
else
{
/* If WDOG reset is not occurred, enables COP */
PRINTF("\r\nCOP example start!\r\n");
COP_Init(SIM, &configCop);
/* Refresh COP 10 times and then wait for timeout reset */
for (uint32_t loopCount = 0U; loopCount < 10U; loopCount++)
{
COP_Refresh(SIM);
PRINTF("COP refresh %d time\r\n", loopCount + 1U);
}
PRINTF("COP will timeout and chip will be reset\r\n");
}
while (1)
{}
omkar