Browse Source

RCC: PLL: Modify CR instead of write, plus remove unnecessary unsafe tag.

trying.tmp
Nathan Conrad 3 years ago
parent
commit
3ba20dc0cb
  1. 3
      CHANGELOG.md
  2. 6
      src/rcc.rs

3
CHANGELOG.md

@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Fixed
- RCC: Correct code to enable PLL.
## [v0.15.2] - 2019-11-04
### Changed

6
src/rcc.rs

@ -87,9 +87,9 @@ mod inner {
// Set PLL source and multiplier
rcc.cfgr
.modify(|_, w| unsafe { w.pllsrc().bit(pllsrc_bit).pllmul().bits(pllmul_bits) });
.modify(|_, w| w.pllsrc().bit(pllsrc_bit).pllmul().bits(pllmul_bits));
rcc.cr.write(|w| w.pllon().set_bit());
rcc.cr.modify(|_, w| w.pllon().set_bit());
while rcc.cr.read().pllrdy().bit_is_clear() {}
rcc.cfgr
@ -176,7 +176,7 @@ mod inner {
rcc.cfgr
.modify(|_, w| w.pllsrc().bits(pllsrc_bit).pllmul().bits(pllmul_bits));
rcc.cr.write(|w| w.pllon().set_bit());
rcc.cr.modify(|_, w| w.pllon().set_bit());
while rcc.cr.read().pllrdy().bit_is_clear() {}
rcc.cfgr

Loading…
Cancel
Save