I am trying to setup watchdog monitor for my application. The watchdog ISR does not seem to be called when the reset occurs.
SDK used: S32SDK_S32K14x_EAR_0.8.4
I am just calling these SDK APIs to configure and initialize the watchdog during the app initialisation:
WDOG_DRV_SetInt(INST_WATCHDOG1, true, watchdogResetHandler);
WDOG_DRV_Init(INST_WATCHDOG1, &watchdog1_Config0);
And my ISR routine just writes a Bytes into the flash and I try to read it back when the device resets:
void watchdogResetHandler()
{
static const uint8_t RESET_SIGNATURE = 0xAB;
//Write an entry indicating watchdog reset
writeNVMData((uint8_t*)0x1400000D, 1, &RESET_SIGNATURE);
}
Looks like the interrupts are enabled properly. But, the bytes 0xAB does not seem to be written. Have I missed to enable something here?
Hi,
Please see WDOG direct reset does not enter the interrupt(S32K144)
The reset is delayed only by 128 bus clock cycles after the WDOG interrupt vector is fetched.
Regardless of the content of WDOG ISR, the reset is forced in 128 bus cycles.
I suppose the execution of the Flash command takes more than that.
Regards,
Daniel