Skip to content

Commit 1a21ce6

Browse files
author
Stephen D
committed
address feedback
1 parent 18b6261 commit 1a21ce6

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
3636
- use register.modify instead of register.write to start PWM [#501]
3737
- add missing generic param for Spi::release implementation.
3838
- build rtic-usb-cdc-echo example [#554]
39+
- reset timer cnt register when changing pwm period [#555]
3940

4041
### Added
4142

@@ -77,6 +78,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
7778
[#552]: https://github.com/stm32-rs/stm32f4xx-hal/pull/552
7879
[#553]: https://github.com/stm32-rs/stm32f4xx-hal/pull/553
7980
[#554]: https://github.com/stm32-rs/stm32f4xx-hal/pull/554
81+
[#555]: https://github.com/stm32-rs/stm32f4xx-hal/pull/555
8082

8183
## [v0.13.2] - 2022-05-16
8284

src/timer/pwm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,5 +445,6 @@ where
445445

446446
pub fn set_period(&mut self, period: TimerDurationU32<FREQ>) {
447447
self.tim.set_auto_reload(period.ticks() - 1).unwrap();
448+
self.tim.cnt_reset();
448449
}
449450
}

0 commit comments

Comments
 (0)