RCC: PLL: Modify CR instead of write, plus remove unnecessary unsafe tag.
This commit is contained in:
parent
22ad0dc0ed
commit
3ba20dc0cb
|
@ -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
|
||||
|
|
|
@ -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…
Reference in New Issue