stm32/pwr: add initial H7 SMPS support

This commit is contained in:
Dario Nieuwenhuis 2021-07-16 01:15:31 +02:00
parent 7ed43cd843
commit 1b42b30201
3 changed files with 12 additions and 2 deletions

View File

@ -35,11 +35,21 @@ impl Power {
// RM0433 Rev 7 6.8.4. This is partially enforced by dropping
// `self` at the end of this method, but of course we cannot
// know what happened between the previous POR and here.
#[cfg(pwr_h7)]
PWR.cr3().modify(|w| {
w.set_scuen(true);
w.set_ldoen(true);
w.set_bypass(false);
});
#[cfg(pwr_h7smps)]
PWR.cr3().modify(|w| {
// hardcode "Direct SPMS" for now, this is what works on nucleos with the
// default solderbridge configuration.
w.set_sden(true);
w.set_ldoen(false);
});
// Validate the supply configuration. If you are stuck here, it is
// because the voltages on your board do not match those specified
// in the D3CR.VOS and CR3.SDLEVEL fields. By default after reset

View File

@ -1,4 +1,4 @@
#[cfg_attr(pwr_h7, path = "h7.rs")]
#[cfg_attr(any(pwr_h7, pwr_h7smps), path = "h7.rs")]
mod _version;
pub use _version::*;

@ -1 +1 @@
Subproject commit b10a0dd9101038d9f93402565e9b9675f15c0871
Subproject commit 32ca79020ec7523fe4c3fcfc02006cb1ea637a19