Hi,
Why is the WDOG1 still counting back to zero while I am debugging?
Also in the WDOG SDK example, I experience the same problem.
/*
* wdogConfig->enableWdog = true;
* wdogConfig->workMode.enableWait = true;
* wdogConfig->workMode.enableStop = false;
* wdogConfig->workMode.enableDebug = false;
* wdogConfig->enableInterrupt = false;
* wdogConfig->enablePowerdown = false;
* wdogConfig->resetExtension = flase;
* wdogConfig->timeoutValue = 0xFFU;
* wdogConfig->interruptTimeValue = 0x04u;
*/
WDOG_GetDefaultConfig(&config);
config.timeoutValue = 0xFU; /* Timeout value is (0xF+1)/2 = 8 sec. */
config.enableInterrupt = true;
config.interruptTimeValue = 0x4U; /* Interrupt occurred (0x4)/2 = 2 sec before WDOG timeout. */
WDOG_Init(DEMO_WDOG_BASE, &config);
PRINTF("--- I add a breakpoint here, wait for >10 seconds and WDOG triggers ---\r\n");
Read the last statement in the snippet above. I added a breakpoint there. After 10+ sec the watchdog triggers.
Shouldn't this take care of that?
* wdogConfig->workMode.enableDebug = false;
snippet from fsl_wdog impl
void WDOG_GetDefaultConfig(wdog_config_t *config)
{
assert(NULL != config);
/* Initializes the configure structure to zero. */
(void)memset(config, 0, sizeof(*config));
config->enableWdog = true;
config->workMode.enableWait = false;
config->workMode.enableStop = false;
config->workMode.enableDebug = false;
config->enableInterrupt = false;
config->softwareResetExtension = false;
config->enablePowerDown = false;
config->timeoutValue = 0xffu;
config->interruptTimeValue = 0x04u;
config->enableTimeOutAssert = false;
}