Skip to content

Commit 49207fb

Browse files
authored
Merge pull request #5549 from jepler/samd-watchdog-rounding
atmel-samd: Fix converting watchdog seconds to cycles
2 parents 11e37b7 + 43b5937 commit 49207fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void setup_wdt(watchdog_watchdogtimer_obj_t *self, int setting) {
7070
}
7171

7272
void common_hal_watchdog_set_timeout(watchdog_watchdogtimer_obj_t *self, mp_float_t new_timeout) {
73-
int wdt_cycles = (int)(new_timeout * 1000);
73+
int wdt_cycles = (int)(new_timeout * 1024);
7474
if (wdt_cycles < 8) {
7575
wdt_cycles = 8;
7676
}

0 commit comments

Comments
 (0)