summaryrefslogtreecommitdiff
path: root/src/tim.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tim.rs')
-rw-r--r--src/tim.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tim.rs b/src/tim.rs
index bede8af..f6b8afa 100644
--- a/src/tim.rs
+++ b/src/tim.rs
@@ -5,6 +5,7 @@ pub struct Timer<'a> (pub &'a tim2::RegisterBlock);
impl<'a> Timer<'a> {
pub fn init(&self, timeout: u32) {
let tim = self.0;
+ tim.dier.modify(|_, w| w.uie().clear_bit());
self.set_timeout(timeout);
tim.cr1.write(|w| w.opm().continuous());
/* UEV to reload the psc and arr (without an interrupt) */