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:
parent
00e0a70a94
commit
a00657d2ae
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue