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.
2 parents a9be75f + 0dbd6f0 commit 0588013Copy full SHA for 0588013
CHANGELOG.md
@@ -24,6 +24,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
24
25
### Changed
26
27
+- Fix hclk miscalculation
28
+
29
## [v0.3.0] - 2019-04-27
30
31
### Added
src/rcc.rs
@@ -204,7 +204,11 @@ impl CFGR {
204
})
205
.unwrap_or(0b0111);
206
207
- let hclk = sysclk / (1 << (hpre_bits - 0b0111));
+ let hclk = if hpre_bits >= 0b1100 {
208
+ sysclk / (1 << (hpre_bits - 0b0110))
209
+ } else {
210
+ sysclk / (1 << (hpre_bits - 0b0111))
211
+ };
212
213
assert!(hclk <= 72_000_000);
214
0 commit comments