stm32/rcc: port F1 to new API.
This commit is contained in:
parent
739c69bd63
commit
b7c147445a
5 changed files with 266 additions and 170 deletions
tests/stm32
|
@ -14,9 +14,9 @@ rustflags = [
|
|||
]
|
||||
|
||||
[build]
|
||||
target = "thumbv6m-none-eabi"
|
||||
#target = "thumbv6m-none-eabi"
|
||||
#target = "thumbv7m-none-eabi"
|
||||
#target = "thumbv7em-none-eabi"
|
||||
target = "thumbv7em-none-eabi"
|
||||
#target = "thumbv8m.main-none-eabihf"
|
||||
|
||||
[env]
|
||||
|
|
|
@ -247,6 +247,24 @@ pub fn config() -> Config {
|
|||
config.rcc = embassy_stm32::rcc::WPAN_DEFAULT;
|
||||
}
|
||||
|
||||
#[cfg(feature = "stm32f103c8")]
|
||||
{
|
||||
use embassy_stm32::rcc::*;
|
||||
config.rcc.hse = Some(Hse {
|
||||
freq: Hertz(8_000_000),
|
||||
mode: HseMode::Oscillator,
|
||||
});
|
||||
config.rcc.pll = Some(Pll {
|
||||
src: PllSource::HSE,
|
||||
prediv: PllPreDiv::DIV1,
|
||||
mul: PllMul::MUL9,
|
||||
});
|
||||
config.rcc.sys = Sysclk::PLL1_P;
|
||||
config.rcc.ahb_pre = AHBPrescaler::DIV1;
|
||||
config.rcc.apb1_pre = APBPrescaler::DIV2;
|
||||
config.rcc.apb2_pre = APBPrescaler::DIV1;
|
||||
}
|
||||
|
||||
#[cfg(feature = "stm32f207zg")]
|
||||
{
|
||||
use embassy_stm32::rcc::*;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue