Merge pull request #55 from stm32-rs/fix-hsi14-init

Use modify instead of write for HSI14 clock setup
This commit is contained in:
Daniel Egger 2019-02-06 10:02:59 +01:00 committed by GitHub
commit cdac82c305
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -17,6 +17,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Updated the ADC code to use variants added in stm32-rs v0.6.0 - @HarkonenBade
- Improved serial `write_str` implementation
### Fixed
- Fixed ADC use trampling over the HSI48 clock settings
## [v0.12.0] - 2019-01-13
### Added

View File

@ -561,7 +561,7 @@ impl Adc {
fn select_clock(&mut self, rcc: &mut Rcc) {
rcc.regs.apb2enr.modify(|_, w| w.adcen().enabled());
rcc.regs.cr2.write(|w| w.hsi14on().on());
rcc.regs.cr2.modify(|_, w| w.hsi14on().on());
while rcc.regs.cr2.read().hsi14rdy().is_not_ready() {}
}