atsamd: Don't clear the watchdog if a clear is still in progress

Clearing the watchdog while it is in progress can cause bus stalls on
the SAMD21.  It appears that clearing the watchdog on the SAMD51 can
cause lockups of the watchdog device.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor committed 2019-02-15 22:13:28 -05:00
1 parent 00e0a70a94
commit a00657d2ae
2 files changed
+4 -2

No files matched your search

+2 -1
View File
@@ -10,7 +10,8 @@
void
watchdog_reset(void)
{
WDT->CLEAR.reg = 0xa5;
if (!(WDT->SYNCBUSY.reg & WDT_SYNCBUSY_CLEAR))
WDT->CLEAR.reg = 0xa5;
}
DECL_TASK(watchdog_reset);
+2 -1
View File
@@ -10,7 +10,8 @@
void
watchdog_reset(void)
{
WDT->CLEAR.reg = 0xa5;
if (!(WDT->STATUS.reg & WDT_STATUS_SYNCBUSY))
WDT->CLEAR.reg = 0xa5;
}
DECL_TASK(watchdog_reset);