stm32/rcc: add missing h7 power config

This commit is contained in:
Badr Bouslikhin 2023-12-02 14:55:00 +01:00
parent 22c39fd697
commit ea43d74780
No known key found for this signature in database

View File

@ -158,6 +158,11 @@ pub enum SupplyConfig {
/// SMPS step-down converter enabled according to SDLEVEL used to supply external circuits and may supply the external source for V CORE . /// SMPS step-down converter enabled according to SDLEVEL used to supply external circuits and may supply the external source for V CORE .
/// SMPS step-down converter forced ON in MR mode. /// SMPS step-down converter forced ON in MR mode.
SMPSExternalLDOBypass(SMPSSupplyVoltage), SMPSExternalLDOBypass(SMPSSupplyVoltage),
/// Power supply configuration from an external source, SMPS disabled and the LDO bypassed.
/// V CORE supplied from external source
/// SMPS step-down converter disabled and LDO bypassed, voltage monitoring still active.
SMPSDisabledLDOBypass,
} }
/// SMPS step-down converter voltage output level. /// SMPS step-down converter voltage output level.
@ -308,6 +313,13 @@ pub(crate) unsafe fn init(config: Config) {
w.set_bypass(matches!(config.supply_config, SupplyConfig::SMPSExternalLDOBypass(_))); w.set_bypass(matches!(config.supply_config, SupplyConfig::SMPSExternalLDOBypass(_)));
}); });
} }
SupplyConfig::SMPSDisabledLDOBypass => {
PWR.cr3().modify(|w| {
w.set_sden(false);
w.set_ldoen(false);
w.set_bypass(true);
});
}
} }
} }