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 28d943d commit e89fcd3Copy full SHA for e89fcd3
CHANGELOG.md
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
7
8
## [Unreleased]
9
10
+### Fixed
11
+
12
+- Fix period retrival for timers
13
14
## [v0.6.0] - 2020-06-06
15
16
### Breaking changes
src/pwm.rs
@@ -371,7 +371,7 @@ macro_rules! hal {
371
fn get_period(&self) -> Self::Time {
372
let clk = self.clk;
373
let psc: u16 = unsafe{(*$TIMX::ptr()).psc.read().psc().bits()};
374
- let arr: u16 = unsafe{(*$TIMX::ptr()).psc.read().psc().bits()};
+ let arr: u16 = unsafe{(*$TIMX::ptr()).arr.read().arr().bits()};
375
376
// Length in ms of an internal clock pulse
377
(clk.0 / u32(psc * arr)).hz()
0 commit comments