diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-02-14 16:40:11 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-02-14 16:40:11 +0000 |
| commit | 5220453d85b1e0f279e94dc1627b7d2434132920 (patch) | |
| tree | 328fa0a2748f9a5133beb9ceb51f8f3858239c61 /tests | |
| parent | 63d592c7b0d1115b57abfd4e8ed918059749b8ff (diff) | |
| parent | 1860e2269311df018a47a9a52f9f942c0285c97b (diff) | |
Merge pull request #2564 from embassy-rs/rcc-f1-update
stm32/rcc: port F1, F0 to new API.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/stm32/.cargo/config.toml | 4 | ||||
| -rw-r--r-- | tests/stm32/src/common.rs | 18 |
2 files changed, 20 insertions, 2 deletions
diff --git a/tests/stm32/.cargo/config.toml b/tests/stm32/.cargo/config.toml index 8e32b4cee..528bd3451 100644 --- a/tests/stm32/.cargo/config.toml +++ b/tests/stm32/.cargo/config.toml | |||
| @@ -14,9 +14,9 @@ rustflags = [ | |||
| 14 | ] | 14 | ] |
| 15 | 15 | ||
| 16 | [build] | 16 | [build] |
| 17 | target = "thumbv6m-none-eabi" | 17 | #target = "thumbv6m-none-eabi" |
| 18 | #target = "thumbv7m-none-eabi" | 18 | #target = "thumbv7m-none-eabi" |
| 19 | #target = "thumbv7em-none-eabi" | 19 | target = "thumbv7em-none-eabi" |
| 20 | #target = "thumbv8m.main-none-eabihf" | 20 | #target = "thumbv8m.main-none-eabihf" |
| 21 | 21 | ||
| 22 | [env] | 22 | [env] |
diff --git a/tests/stm32/src/common.rs b/tests/stm32/src/common.rs index 36fe8a235..182ad6298 100644 --- a/tests/stm32/src/common.rs +++ b/tests/stm32/src/common.rs | |||
| @@ -247,6 +247,24 @@ pub fn config() -> Config { | |||
| 247 | config.rcc = embassy_stm32::rcc::WPAN_DEFAULT; | 247 | config.rcc = embassy_stm32::rcc::WPAN_DEFAULT; |
| 248 | } | 248 | } |
| 249 | 249 | ||
| 250 | #[cfg(feature = "stm32f103c8")] | ||
| 251 | { | ||
| 252 | use embassy_stm32::rcc::*; | ||
| 253 | config.rcc.hse = Some(Hse { | ||
| 254 | freq: Hertz(8_000_000), | ||
| 255 | mode: HseMode::Oscillator, | ||
| 256 | }); | ||
| 257 | config.rcc.pll = Some(Pll { | ||
| 258 | src: PllSource::HSE, | ||
| 259 | prediv: PllPreDiv::DIV1, | ||
| 260 | mul: PllMul::MUL9, | ||
| 261 | }); | ||
| 262 | config.rcc.sys = Sysclk::PLL1_P; | ||
| 263 | config.rcc.ahb_pre = AHBPrescaler::DIV1; | ||
| 264 | config.rcc.apb1_pre = APBPrescaler::DIV2; | ||
| 265 | config.rcc.apb2_pre = APBPrescaler::DIV1; | ||
| 266 | } | ||
| 267 | |||
| 250 | #[cfg(feature = "stm32f207zg")] | 268 | #[cfg(feature = "stm32f207zg")] |
| 251 | { | 269 | { |
| 252 | use embassy_stm32::rcc::*; | 270 | use embassy_stm32::rcc::*; |
