javos65 / WDTZero

Allows to use the WatchDog functionality for Arduino Zero, MKRZero and MKR1000 only
15 stars 12 forks source link

Resetting the WTD timer #11

Open dkanday opened 2 years ago

dkanday commented 2 years ago

Hi there,

Is there a function or a code which can be used to reset the watchdog timer? I am trying to use at the beginning of the loop().

sw34 commented 2 years ago

I assume by reset you mean to tell the timer to go back to zero?

assuming you setup the time with this (or similar):

WDTZero watchDogTimer;
watchDogTimer.setup(WDT_SOFTCYCLE2M);

at every loop call:

watchDogTimer.clear();
dkanday commented 2 years ago

Yes, I figured that out after I posted it here. Thank you!