We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 385cb97 commit 4f160dcCopy full SHA for 4f160dc
src/timer.rs
@@ -263,6 +263,11 @@ macro_rules! hal {
263
let arr = u16(ticks / u32(psc + 1)).unwrap();
264
self.tim.arr.write(|w| unsafe { w.bits(u32(arr)) });
265
266
+ // Trigger update event to load the registers
267
+ self.tim.cr1.modify(|_, w| w.urs().set_bit());
268
+ self.tim.egr.write(|w| w.ug().set_bit());
269
+ self.tim.cr1.modify(|_, w| w.urs().clear_bit());
270
+
271
// start counter
272
self.tim.cr1.modify(|_, w| w.cen().set_bit());
273
}
0 commit comments