Skip to content

Commit 8486da1

Browse files
authored
Merge pull request #152 from Sh3Rm4n/rcc-pll-fix
Remove divisor check for HSE PRE_DIV
2 parents 54e8261 + 78629a8 commit 8486da1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2020
- Introduced auto-generated GPIO mappings based on the STM32CubeMX database
2121
([#129](https://github.com/stm32-rs/stm32f3xx-hal/pull/129))
2222

23+
- Fixed [#151][] not being
24+
able to generate 72 MHz HCLK for stm32f303xc devices ([#152](https://github.com/stm32-rs/stm32f3xx-hal/pull/152))
25+
26+
[#151]: https://github.com/stm32-rs/stm32f3xx-hal/issues/151
27+
2328
## [v0.5.0] - 2020-07-21
2429

2530
### Added

src/rcc.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,11 +369,9 @@ impl CFGR {
369369
let mut divisor = pllsrcclk / common_divisor;
370370

371371
// Check if the multiplier can be represented by PLL_MUL
372-
// or if the divisor can be represented by PRE_DIV
373-
if multiplier == 1 || divisor == 1 {
372+
if multiplier == 1 {
374373
// PLL_MUL minimal value is 2
375374
multiplier *= 2;
376-
// PRE_DIV minimal value is 2
377375
divisor *= 2;
378376
}
379377

0 commit comments

Comments
 (0)