Fix `MonoTimer` and `Timer::syst` frequency
@@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
+- Fix wrong frequency reported by `MonoTimer`
+- Fix wrong timings generated by `Timer::syst`
- Fix period retrieval for timers
### Changed
@@ -241,7 +241,7 @@ impl MonoTimer {
drop(dwt);
MonoTimer {
- frequency: clocks.sysclk(),
+ frequency: clocks.hclk(),
}
@@ -163,7 +163,7 @@ impl Timer<SYST> {
syst.set_clock_source(SystClkSource::Core);
Self {
tim: syst,
- clk: clocks.sysclk(),
+ clk: clocks.hclk(),