sam3x8e: Fix watchdog timeout calculation
Fix error causing the watchdog to be set to an ~4ms timeout instead of 500ms. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
e12527b895
commit
88a10fb31c
|
@ -25,7 +25,7 @@ DECL_TASK(watchdog_reset);
|
|||
void
|
||||
watchdog_init(void)
|
||||
{
|
||||
uint32_t timeout = 32768 / 2; // 500ms timeout
|
||||
uint32_t timeout = 500 * 32768 / 128 / 1000; // 500ms timeout
|
||||
WDT->WDT_MR = WDT_MR_WDRSTEN | WDT_MR_WDV(timeout) | WDT_MR_WDD(timeout);
|
||||
}
|
||||
DECL_INIT(watchdog_init);
|
||||
|
|
Loading…
Reference in New Issue