WDOG32_GetDefaultConfig(&config);
config.testMode = kWDOG32_UserModeEnabled;
config.clockSource = kWDOG32_ClockSource0;
config.prescaler = kWDOG32_ClockPrescalerDivide256;
config.windowValue = 6000U;
config.timeoutValue = 60000U;
config.workMode.enableDebug = true;
PRINTF("\r\n----- Refresh test start -----\r\n");
/* Refresh test in none-window mode */
PRINTF("----- None-window mode -----\r\n");
config.enableWindowMode = false;
config.enableWdog32 = true;
WDOG32_Init(wdog32_base, &config);
#if defined(FSL_FEATURE_WDOG_HAS_ERRATA_010536) && FSL_FEATURE_WDOG_HAS_ERRATA_010536
/* Becaues of ERR010536, application need to wait at least 4 LPO clock
* after WDOG32_Init before any other WDOG32 operations.
*/
Wdog32Errata010536();
#endif
for (int i = 0; i < 10; i++)
{
for (;;)
{
if (1000 * i < WDOG32_GetCounterValue(wdog32_base))
{
PRINTF("Refresh wdog32 %d time\r\n", i);
WDOG32_Refresh(wdog32_base);
break;
}
}
}
This is my code based on the wdog demo, could you show me yours? Thanks!
Best Regards.