Hi,
I am trying to setup watchdog for s32k144. For that i am using sdk. The sequence to setup is watchdog is defined below:
Now the problem is that if i comment "WDOG_DRV_Trigger(INST_WATCHDOG);" then the MCU does not restart. But if i do run code in debug mode and add breakpoint on "WDOG_DRV_Init" function then watchdog resets MCU.
Any idea what might be wrong with my configuration as my watchdog only perform reset when i am in debug mode plus i add breakpoint on "WDOG_DRV_Init".
Thanks
Solved! Go to Solution.
The issue was due to optimization level. For above test i was using optimization of -Os. Once i switched to -O0, it would work every time.
The issue was due to optimization level. For above test i was using optimization of -Os. Once i switched to -O0, it would work every time.