aboutsummaryrefslogtreecommitdiff
path: root/tests/stm32/src
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stm32/src')
-rw-r--r--tests/stm32/src/common.rs18
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/stm32/src/common.rs b/tests/stm32/src/common.rs
index 4f51e4f6a..ff808281a 100644
--- a/tests/stm32/src/common.rs
+++ b/tests/stm32/src/common.rs
@@ -312,7 +312,7 @@ pub fn config() -> Config {
312 mode: HseMode::BypassDigital, 312 mode: HseMode::BypassDigital,
313 }); 313 });
314 config.rcc.pll1 = Some(Pll { 314 config.rcc.pll1 = Some(Pll {
315 source: PllSource::Hse, 315 source: PllSource::HSE,
316 prediv: PllPreDiv::DIV2, 316 prediv: PllPreDiv::DIV2,
317 mul: PllMul::MUL125, 317 mul: PllMul::MUL125,
318 divp: Some(PllDiv::DIV2), 318 divp: Some(PllDiv::DIV2),
@@ -323,18 +323,18 @@ pub fn config() -> Config {
323 config.rcc.apb1_pre = APBPrescaler::DIV1; 323 config.rcc.apb1_pre = APBPrescaler::DIV1;
324 config.rcc.apb2_pre = APBPrescaler::DIV1; 324 config.rcc.apb2_pre = APBPrescaler::DIV1;
325 config.rcc.apb3_pre = APBPrescaler::DIV1; 325 config.rcc.apb3_pre = APBPrescaler::DIV1;
326 config.rcc.sys = Sysclk::Pll1P; 326 config.rcc.sys = Sysclk::PLL1_P;
327 config.rcc.voltage_scale = VoltageScale::Scale0; 327 config.rcc.voltage_scale = VoltageScale::Scale0;
328 } 328 }
329 329
330 #[cfg(any(feature = "stm32h755zi", feature = "stm32h753zi"))] 330 #[cfg(any(feature = "stm32h755zi", feature = "stm32h753zi"))]
331 { 331 {
332 use embassy_stm32::rcc::*; 332 use embassy_stm32::rcc::*;
333 config.rcc.hsi = Some(Hsi::Mhz64); 333 config.rcc.hsi = Some(HSIPrescaler::DIV1);
334 config.rcc.csi = true; 334 config.rcc.csi = true;
335 config.rcc.hsi48 = true; // needed for RNG 335 config.rcc.hsi48 = true; // needed for RNG
336 config.rcc.pll_src = PllSource::Hsi;
337 config.rcc.pll1 = Some(Pll { 336 config.rcc.pll1 = Some(Pll {
337 source: PllSource::HSI,
338 prediv: PllPreDiv::DIV4, 338 prediv: PllPreDiv::DIV4,
339 mul: PllMul::MUL50, 339 mul: PllMul::MUL50,
340 divp: Some(PllDiv::DIV2), 340 divp: Some(PllDiv::DIV2),
@@ -342,13 +342,14 @@ pub fn config() -> Config {
342 divr: None, 342 divr: None,
343 }); 343 });
344 config.rcc.pll2 = Some(Pll { 344 config.rcc.pll2 = Some(Pll {
345 source: PllSource::HSI,
345 prediv: PllPreDiv::DIV4, 346 prediv: PllPreDiv::DIV4,
346 mul: PllMul::MUL50, 347 mul: PllMul::MUL50,
347 divp: Some(PllDiv::DIV8), // 100mhz 348 divp: Some(PllDiv::DIV8), // 100mhz
348 divq: None, 349 divq: None,
349 divr: None, 350 divr: None,
350 }); 351 });
351 config.rcc.sys = Sysclk::Pll1P; // 400 Mhz 352 config.rcc.sys = Sysclk::PLL1_P; // 400 Mhz
352 config.rcc.ahb_pre = AHBPrescaler::DIV2; // 200 Mhz 353 config.rcc.ahb_pre = AHBPrescaler::DIV2; // 200 Mhz
353 config.rcc.apb1_pre = APBPrescaler::DIV2; // 100 Mhz 354 config.rcc.apb1_pre = APBPrescaler::DIV2; // 100 Mhz
354 config.rcc.apb2_pre = APBPrescaler::DIV2; // 100 Mhz 355 config.rcc.apb2_pre = APBPrescaler::DIV2; // 100 Mhz
@@ -361,11 +362,11 @@ pub fn config() -> Config {
361 #[cfg(any(feature = "stm32h7a3zi"))] 362 #[cfg(any(feature = "stm32h7a3zi"))]
362 { 363 {
363 use embassy_stm32::rcc::*; 364 use embassy_stm32::rcc::*;
364 config.rcc.hsi = Some(Hsi::Mhz64); 365 config.rcc.hsi = Some(HSIPrescaler::DIV1);
365 config.rcc.csi = true; 366 config.rcc.csi = true;
366 config.rcc.hsi48 = true; // needed for RNG 367 config.rcc.hsi48 = true; // needed for RNG
367 config.rcc.pll_src = PllSource::Hsi;
368 config.rcc.pll1 = Some(Pll { 368 config.rcc.pll1 = Some(Pll {
369 source: PllSource::HSI,
369 prediv: PllPreDiv::DIV4, 370 prediv: PllPreDiv::DIV4,
370 mul: PllMul::MUL35, 371 mul: PllMul::MUL35,
371 divp: Some(PllDiv::DIV2), // 280 Mhz 372 divp: Some(PllDiv::DIV2), // 280 Mhz
@@ -373,13 +374,14 @@ pub fn config() -> Config {
373 divr: None, 374 divr: None,
374 }); 375 });
375 config.rcc.pll2 = Some(Pll { 376 config.rcc.pll2 = Some(Pll {
377 source: PllSource::HSI,
376 prediv: PllPreDiv::DIV4, 378 prediv: PllPreDiv::DIV4,
377 mul: PllMul::MUL35, 379 mul: PllMul::MUL35,
378 divp: Some(PllDiv::DIV8), // 70 Mhz 380 divp: Some(PllDiv::DIV8), // 70 Mhz
379 divq: None, 381 divq: None,
380 divr: None, 382 divr: None,
381 }); 383 });
382 config.rcc.sys = Sysclk::Pll1P; // 280 Mhz 384 config.rcc.sys = Sysclk::PLL1_P; // 280 Mhz
383 config.rcc.ahb_pre = AHBPrescaler::DIV1; // 280 Mhz 385 config.rcc.ahb_pre = AHBPrescaler::DIV1; // 280 Mhz
384 config.rcc.apb1_pre = APBPrescaler::DIV2; // 140 Mhz 386 config.rcc.apb1_pre = APBPrescaler::DIV2; // 140 Mhz
385 config.rcc.apb2_pre = APBPrescaler::DIV2; // 140 Mhz 387 config.rcc.apb2_pre = APBPrescaler::DIV2; // 140 Mhz