I need to implement APIs related to watchdog timer.
I could not find any notes or examples on the site.
Could you share please ?
Thanks in advance.
Hi
There are different watchdog types in the Kintis parts but this is how the majority of M4 based ones can be retriggered:
if ((WDOG_STCTRLH & WDOG_STCTRLH_WDOGEN) != 0) {// if watchdog is enabled
uDisable_Interrupt(); // protect the refresh sequence from interrupts
WDOG_REFRESH = WDOG_REFRESH_SEQUENCE_1;
WDOG_REFRESH = WDOG_REFRESH_SEQUENCE_2;
WDOG_TMROUTH = 0;
WDOG_TMROUTL = 0; // this sequence must be performed within 20 bus cycles (it should be protected against interrupts disturbing it)
uEnable_Interrupt();
}
Regards
Mark