aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-wdt.c
diff options
context:
space:
mode:
authorGabriel Hart2020-12-20 12:27:05 -0600
committerGabriel Hart2020-12-20 12:27:05 -0600
commit8b67b3a6e21342aefb1fffef72469588ecab2614 (patch)
treee4b213ce4adbf5401a18e36a808911c286ec1969 /spaghetti-monster/fsm-wdt.c
parentAdd AVR 1-Series and t1616 board and scripts (diff)
downloadanduril-8b67b3a6e21342aefb1fffef72469588ecab2614.tar.gz
anduril-8b67b3a6e21342aefb1fffef72469588ecab2614.tar.bz2
anduril-8b67b3a6e21342aefb1fffef72469588ecab2614.zip
Fix 1-Series standby tick speed, use 2C Turbo
Diffstat (limited to '')
-rw-r--r--spaghetti-monster/fsm-wdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/spaghetti-monster/fsm-wdt.c b/spaghetti-monster/fsm-wdt.c
index 7bb8acc..ea2efac 100644
--- a/spaghetti-monster/fsm-wdt.c
+++ b/spaghetti-monster/fsm-wdt.c
@@ -64,7 +64,7 @@ inline void WDT_slow()
#elif defined(AVRXMEGA3) // ATTINY816, 817, etc
RTC.PITINTCTRL = RTC_PI_bm; // enable the Periodic Interrupt
while (RTC.PITSTATUS > 0) {} // make sure the register is ready to be updated
- RTC.PITCTRLA = RTC_PERIOD_CYC16384_gc | RTC_PITEN_bm; // Period = 0.5s, enable the PI Timer
+ RTC.PITCTRLA = (1<<6) | (STANDBY_TICK_SPEED<<3) | RTC_PITEN_bm; // Set period, enable the PI Timer
#else
#error Unrecognized MCU type
#endif