stm32f1xx-hal icon indicating copy to clipboard operation
stm32f1xx-hal copied to clipboard

Add an option to allow overclocking

Open nicolas-robin opened this issue 1 year ago • 0 comments

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);

nicolas-robin avatar Aug 17 '24 17:08 nicolas-robin