Hello,
I am working on the i.MX8ULP and trying to use the WDOG32 in interrupt mode before it triggers a reset.
Even though I have configured the watchdog with interrupt enabled, it is still behaving as a normal watchdog — it resets the system directly without generating an interrupt.
void WDOG0_IRQHandler(void)
{
PRINTF("Watchdog IRQ triggered! Count = %u\r\n", wdog_irq_count);
/* Clear interrupt flag */
WDOG32_ClearStatusFlags(WDOG0, kWDOG32_InterruptFlag);
wdog_irq_count++;
SDK_ISR_EXIT_BARRIER;
}
/* Get default configuration */
WDOG32_GetDefaultConfig(&config);
/* Enable interrupt mode */
config.enableInterrupt = true;
config.timeoutValue = WDOG_TIMEOUT_VALUE;
NVIC_EnableIRQ(WDOG0_IRQn);
for (temp = 0; temp < DELAY_TIME; temp++)
{
__NOP();
}
/* Initialize WDOG32 with config */
WDOG32_Init(WDOG0, &config);
while(1)
{
}
I have attached full wdog32.c file also in that watchdog IRQ i have put watchdog refresh but still it is resetting after timeout occurs.
Are there any additional initialization needed for WDOG32 interrupt mode and in this i only required interrupt not reset is it possible?