stm32/rcc: port c0 to new api. Add c0 HSIKER/HSISYS support.
This commit is contained in:
parent
c8c4b0b701
commit
ae266f3bf5
3 changed files with 154 additions and 109 deletions
tests/stm32/src
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue