diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/stm32/src/common.rs | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/tests/stm32/src/common.rs b/tests/stm32/src/common.rs index 32ba03e4f..79a9b5e86 100644 --- a/tests/stm32/src/common.rs +++ b/tests/stm32/src/common.rs | |||
| @@ -202,9 +202,9 @@ pub fn config() -> Config { | |||
| 202 | // 1 MHz PLL input * 240 = 240 MHz PLL VCO | 202 | // 1 MHz PLL input * 240 = 240 MHz PLL VCO |
| 203 | mul: unwrap!(PLLMul::try_from(240)), | 203 | mul: unwrap!(PLLMul::try_from(240)), |
| 204 | // 240 MHz PLL VCO / 2 = 120 MHz main PLL output | 204 | // 240 MHz PLL VCO / 2 = 120 MHz main PLL output |
| 205 | main_div: PLLMainDiv::Div2, | 205 | p_div: PLLPDiv::DIV2, |
| 206 | // 240 MHz PLL VCO / 5 = 48 MHz PLL48 output | 206 | // 240 MHz PLL VCO / 5 = 48 MHz PLL48 output |
| 207 | pll48_div: unwrap!(PLL48Div::try_from(5)), | 207 | q_div: PLLQDiv::DIV5, |
| 208 | }; | 208 | }; |
| 209 | // System clock comes from PLL (= the 120 MHz main PLL output) | 209 | // System clock comes from PLL (= the 120 MHz main PLL output) |
| 210 | config.rcc.mux = ClockSrc::PLL; | 210 | config.rcc.mux = ClockSrc::PLL; |
| @@ -239,10 +239,10 @@ pub fn config() -> Config { | |||
| 239 | }); | 239 | }); |
| 240 | config.rcc.pll1 = Some(Pll { | 240 | config.rcc.pll1 = Some(Pll { |
| 241 | source: PllSource::Hse, | 241 | source: PllSource::Hse, |
| 242 | prediv: 2, | 242 | prediv: PllPreDiv::DIV2, |
| 243 | mul: 125, | 243 | mul: PllMul::MUL125, |
| 244 | divp: Some(2), | 244 | divp: Some(PllDiv::DIV2), |
| 245 | divq: Some(2), | 245 | divq: Some(PllDiv::DIV2), |
| 246 | divr: None, | 246 | divr: None, |
| 247 | }); | 247 | }); |
| 248 | config.rcc.ahb_pre = AHBPrescaler::DIV1; | 248 | config.rcc.ahb_pre = AHBPrescaler::DIV1; |
| @@ -261,16 +261,16 @@ pub fn config() -> Config { | |||
| 261 | config.rcc.hsi48 = true; // needed for RNG | 261 | config.rcc.hsi48 = true; // needed for RNG |
| 262 | config.rcc.pll_src = PllSource::Hsi; | 262 | config.rcc.pll_src = PllSource::Hsi; |
| 263 | config.rcc.pll1 = Some(Pll { | 263 | config.rcc.pll1 = Some(Pll { |
| 264 | prediv: 4, | 264 | prediv: PllPreDiv::DIV4, |
| 265 | mul: 50, | 265 | mul: PllMul::MUL50, |
| 266 | divp: Some(2), | 266 | divp: Some(PllDiv::DIV2), |
| 267 | divq: Some(8), // SPI1 cksel defaults to pll1_q | 267 | divq: Some(PllDiv::DIV8), // SPI1 cksel defaults to pll1_q |
| 268 | divr: None, | 268 | divr: None, |
| 269 | }); | 269 | }); |
| 270 | config.rcc.pll2 = Some(Pll { | 270 | config.rcc.pll2 = Some(Pll { |
| 271 | prediv: 4, | 271 | prediv: PllPreDiv::DIV4, |
| 272 | mul: 50, | 272 | mul: PllMul::MUL50, |
| 273 | divp: Some(8), // 100mhz | 273 | divp: Some(PllDiv::DIV8), // 100mhz |
| 274 | divq: None, | 274 | divq: None, |
| 275 | divr: None, | 275 | divr: None, |
| 276 | }); | 276 | }); |
| @@ -290,10 +290,10 @@ pub fn config() -> Config { | |||
| 290 | config.rcc.mux = ClockSrc::PLL( | 290 | config.rcc.mux = ClockSrc::PLL( |
| 291 | // 72Mhz clock (16 / 1 * 18 / 4) | 291 | // 72Mhz clock (16 / 1 * 18 / 4) |
| 292 | PLLSource::HSI16, | 292 | PLLSource::HSI16, |
| 293 | PLLClkDiv::Div4, | 293 | PllRDiv::DIV4, |
| 294 | PLLSrcDiv::Div1, | 294 | PllPreDiv::DIV1, |
| 295 | PLLMul::Mul18, | 295 | PllMul::MUL18, |
| 296 | Some(PLLClkDiv::Div6), // 48Mhz (16 / 1 * 18 / 6) | 296 | Some(PllQDiv::DIV6), // 48Mhz (16 / 1 * 18 / 6) |
| 297 | ); | 297 | ); |
| 298 | } | 298 | } |
| 299 | 299 | ||
| @@ -303,9 +303,9 @@ pub fn config() -> Config { | |||
| 303 | config.rcc.mux = ClockSrc::PLL( | 303 | config.rcc.mux = ClockSrc::PLL( |
| 304 | // 110Mhz clock (16 / 4 * 55 / 2) | 304 | // 110Mhz clock (16 / 4 * 55 / 2) |
| 305 | PLLSource::HSI16, | 305 | PLLSource::HSI16, |
| 306 | PLLClkDiv::Div2, | 306 | PllRDiv::DIV2, |
| 307 | PLLSrcDiv::Div4, | 307 | PllPreDiv::DIV4, |
| 308 | PLLMul::Mul55, | 308 | PllMul::MUL55, |
| 309 | None, | 309 | None, |
| 310 | ); | 310 | ); |
| 311 | } | 311 | } |
| @@ -313,7 +313,7 @@ pub fn config() -> Config { | |||
| 313 | #[cfg(feature = "stm32u585ai")] | 313 | #[cfg(feature = "stm32u585ai")] |
| 314 | { | 314 | { |
| 315 | use embassy_stm32::rcc::*; | 315 | use embassy_stm32::rcc::*; |
| 316 | config.rcc.mux = ClockSrc::MSI(MSIRange::Range48mhz); | 316 | config.rcc.mux = ClockSrc::MSI(Msirange::RANGE_48MHZ); |
| 317 | } | 317 | } |
| 318 | 318 | ||
| 319 | #[cfg(feature = "stm32l073rz")] | 319 | #[cfg(feature = "stm32l073rz")] |
