stm32/rcc: port c0 to new api. Add c0 HSIKER/HSISYS support.

This commit is contained in:
Dario Nieuwenhuis 2024-03-04 00:03:07 +01:00
parent c8c4b0b701
commit ae266f3bf5
3 changed files with 154 additions and 109 deletions
tests/stm32/src

View file

@ -260,6 +260,17 @@ pub fn config() -> Config {
#[allow(unused_mut)]
let mut config = Config::default();
#[cfg(feature = "stm32c031c6")]
{
config.rcc.hsi = Some(Hsi {
sys_div: HsiSysDiv::DIV1, // 48Mhz
ker_div: HsiKerDiv::DIV3, // 16Mhz
});
config.rcc.sys = Sysclk::HSISYS;
config.rcc.ahb_pre = AHBPrescaler::DIV1;
config.rcc.apb1_pre = APBPrescaler::DIV1;
}
#[cfg(feature = "stm32g071rb")]
{
config.rcc.hsi = true;