aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-09-20 22:28:09 +0000
committerGitHub <[email protected]>2023-09-20 22:28:09 +0000
commit766ae724cbebf40d338679b5e18b8acb52972f06 (patch)
treeba1131d9e4748c1e0495d9ee0b7a48ab67e888f8
parente1ed492577d2151b4cc8ef995536dd045d2db087 (diff)
parent00b9f9acef129155e0c9d1fa7d021104103a897b (diff)
Merge pull request #1932 from embassy-rs/h7fix
stm32/h7: fix bad PWR reg versions.
-rw-r--r--embassy-stm32/src/rcc/h7.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/embassy-stm32/src/rcc/h7.rs b/embassy-stm32/src/rcc/h7.rs
index 585e1faac..ea26c26c1 100644
--- a/embassy-stm32/src/rcc/h7.rs
+++ b/embassy-stm32/src/rcc/h7.rs
@@ -464,14 +464,14 @@ pub(crate) unsafe fn init(mut config: Config) {
464 // RM0433 Rev 7 6.8.4. This is partially enforced by dropping 464 // RM0433 Rev 7 6.8.4. This is partially enforced by dropping
465 // `self` at the end of this method, but of course we cannot 465 // `self` at the end of this method, but of course we cannot
466 // know what happened between the previous POR and here. 466 // know what happened between the previous POR and here.
467 #[cfg(pwr_h7)] 467 #[cfg(pwr_h7rm0433)]
468 PWR.cr3().modify(|w| { 468 PWR.cr3().modify(|w| {
469 w.set_scuen(true); 469 w.set_scuen(true);
470 w.set_ldoen(true); 470 w.set_ldoen(true);
471 w.set_bypass(false); 471 w.set_bypass(false);
472 }); 472 });
473 473
474 #[cfg(pwr_h7smps)] 474 #[cfg(any(pwr_h7rm0399, pwr_h7rm0455, pwr_h7rm0468))]
475 PWR.cr3().modify(|w| { 475 PWR.cr3().modify(|w| {
476 // hardcode "Direct SPMS" for now, this is what works on nucleos with the 476 // hardcode "Direct SPMS" for now, this is what works on nucleos with the
477 // default solderbridge configuration. 477 // default solderbridge configuration.
@@ -484,7 +484,9 @@ pub(crate) unsafe fn init(mut config: Config) {
484 // in the D3CR.VOS and CR3.SDLEVEL fields. By default after reset 484 // in the D3CR.VOS and CR3.SDLEVEL fields. By default after reset
485 // VOS = Scale 3, so check that the voltage on the VCAP pins = 485 // VOS = Scale 3, so check that the voltage on the VCAP pins =
486 // 1.0V. 486 // 1.0V.
487 info!("a");
487 while !PWR.csr1().read().actvosrdy() {} 488 while !PWR.csr1().read().actvosrdy() {}
489 info!("b");
488 490
489 #[cfg(syscfg_h7)] 491 #[cfg(syscfg_h7)]
490 { 492 {