diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-08-07 23:47:34 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-08-08 00:27:27 -0400 |
commit | 88a10fb31cce34bf3d3a740a70f661d1656b28c5 (patch) | |
tree | 04f9a67219219a9308c12659d71ffe0fed6f5814 /src | |
parent | e12527b8950f8f5ed4f7bb638bcf78abf3fc818c (diff) | |
download | kutter-88a10fb31cce34bf3d3a740a70f661d1656b28c5.tar.gz kutter-88a10fb31cce34bf3d3a740a70f661d1656b28c5.tar.xz kutter-88a10fb31cce34bf3d3a740a70f661d1656b28c5.zip |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/sam3x8e/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sam3x8e/main.c b/src/sam3x8e/main.c index e8bd30ba..dd8445ac 100644 --- a/src/sam3x8e/main.c +++ b/src/sam3x8e/main.c @@ -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); |