diff options
author | Wulfsta <wulfstawulfsta@gmail.com> | 2023-01-16 01:32:31 -0500 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2023-05-01 13:56:32 -0400 |
commit | 3b0729c94932f4df0298a7c992022f54a5454428 (patch) | |
tree | 7de15ab057083440fb76ed990294f9c47f85b512 /src/atsamd/samd51_watchdog.c | |
parent | 06e5c577bd1874d48e1aefd13d8639525e571670 (diff) | |
download | kutter-3b0729c94932f4df0298a7c992022f54a5454428.tar.gz kutter-3b0729c94932f4df0298a7c992022f54a5454428.tar.xz kutter-3b0729c94932f4df0298a7c992022f54a5454428.zip |
atsamd: Add support for SAMC21
Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
Diffstat (limited to 'src/atsamd/samd51_watchdog.c')
-rw-r--r-- | src/atsamd/samd51_watchdog.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/atsamd/samd51_watchdog.c b/src/atsamd/samd51_watchdog.c index 8c970dba..a0ec5c9e 100644 --- a/src/atsamd/samd51_watchdog.c +++ b/src/atsamd/samd51_watchdog.c @@ -18,7 +18,11 @@ DECL_TASK(watchdog_reset); void watchdog_init(void) { +#if CONFIG_MACH_SAMC21 + WDT->CONFIG.reg = WDT_CONFIG_PER_CYC512; // 500ms timeout +#elif CONFIG_MACH_SAMX5 WDT->CONFIG.reg = WDT_CONFIG_PER(6); // 500ms timeout +#endif WDT->CTRLA.reg = WDT_CTRLA_ENABLE; } DECL_INIT(watchdog_init); |