aboutsummaryrefslogtreecommitdiff
path: root/src/tq.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tq.rs')
-rw-r--r--src/tq.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tq.rs b/src/tq.rs
index 4edb40a7..21beeb9c 100644
--- a/src/tq.rs
+++ b/src/tq.rs
@@ -68,6 +68,13 @@ where
.map(|x| x / ratio.denominator)
}) {
None => MAX,
+
+ // ARM Architecture Reference Manual says:
+ // "Setting SYST_RVR to zero has the effect of
+ // disabling the SysTick counter independently
+ // of the counter enable bit."
+ Some(0) => 1,
+
Some(x) => cmp::min(MAX, x),
};
mem::transmute::<_, SYST>(()).set_reload(dur);