Parcourir la source

Fix Timer::syst

TheZoq2 il y a 3 ans
Parent
commit
48eb5fee67
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1 1
      CHANGELOG.md
  2. 1 1
      src/timer.rs

+ 1 - 1
CHANGELOG.md

@@ -14,6 +14,7 @@ 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
@@ -23,7 +24,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
 - Improve `SPI` documentation
 - Improve `RCC` and `AFIO` register documentation
 
-
 ## [v0.6.0] - 2020-06-06
 
 ### Breaking changes

+ 1 - 1
src/timer.rs

@@ -163,7 +163,7 @@ impl Timer<SYST> {
         syst.set_clock_source(SystClkSource::Core);
         Self {
             tim: syst,
-            clk: clocks.sysclk(),
+            clk: clocks.hclk(),
         }
     }