stm32/pwr: add initial H7 SMPS support
This commit is contained in:
parent
7ed43cd843
commit
1b42b30201
@ -35,11 +35,21 @@ impl Power {
|
|||||||
// RM0433 Rev 7 6.8.4. This is partially enforced by dropping
|
// RM0433 Rev 7 6.8.4. This is partially enforced by dropping
|
||||||
// `self` at the end of this method, but of course we cannot
|
// `self` at the end of this method, but of course we cannot
|
||||||
// know what happened between the previous POR and here.
|
// know what happened between the previous POR and here.
|
||||||
|
#[cfg(pwr_h7)]
|
||||||
PWR.cr3().modify(|w| {
|
PWR.cr3().modify(|w| {
|
||||||
w.set_scuen(true);
|
w.set_scuen(true);
|
||||||
w.set_ldoen(true);
|
w.set_ldoen(true);
|
||||||
w.set_bypass(false);
|
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
|
// Validate the supply configuration. If you are stuck here, it is
|
||||||
// because the voltages on your board do not match those specified
|
// because the voltages on your board do not match those specified
|
||||||
// in the D3CR.VOS and CR3.SDLEVEL fields. By default after reset
|
// in the D3CR.VOS and CR3.SDLEVEL fields. By default after reset
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#[cfg_attr(pwr_h7, path = "h7.rs")]
|
#[cfg_attr(any(pwr_h7, pwr_h7smps), path = "h7.rs")]
|
||||||
mod _version;
|
mod _version;
|
||||||
|
|
||||||
pub use _version::*;
|
pub use _version::*;
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit b10a0dd9101038d9f93402565e9b9675f15c0871
|
Subproject commit 32ca79020ec7523fe4c3fcfc02006cb1ea637a19
|
Loading…
Reference in New Issue
Block a user