stm32f1xx-hal
stm32f1xx-hal copied to clipboard
Add an option to allow overclocking
Similar to this PR in stm32f4xx-hal, I am porting a firmware on existing target that was designed to run faster than the official speed. This PR bypass the assert if allow_overclock is set in Config :
let clocks = rcc.cfgr.freeze_with_config(Config{
hse: Some(10_000_000),
hse_bypass: true,
pllmul: Some(0b1000),
hpre: HPre::Div1,
ppre1: PPre::Div4,
ppre2: PPre::Div1,
usbpre: UsbPre::Div1,
adcpre: AdcPre::Div8,
allow_overclock: true,
}, &mut flash.acr);