diff options
| author | Badr Bouslikhin <[email protected]> | 2023-12-02 14:55:00 +0100 |
|---|---|---|
| committer | Badr Bouslikhin <[email protected]> | 2023-12-02 14:55:00 +0100 |
| commit | ea43d74780fd801a6e68820d01fd7dd21287acf8 (patch) | |
| tree | d6238858eda48111891fba7ccb78c2cf5406ee53 | |
| parent | 22c39fd6970ceb335949e6cef15331c993105a14 (diff) | |
stm32/rcc: add missing h7 power config
| -rw-r--r-- | embassy-stm32/src/rcc/h.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/embassy-stm32/src/rcc/h.rs b/embassy-stm32/src/rcc/h.rs index 644647d91..1889eb280 100644 --- a/embassy-stm32/src/rcc/h.rs +++ b/embassy-stm32/src/rcc/h.rs | |||
| @@ -158,6 +158,11 @@ pub enum SupplyConfig { | |||
| 158 | /// SMPS step-down converter enabled according to SDLEVEL used to supply external circuits and may supply the external source for V CORE . | 158 | /// SMPS step-down converter enabled according to SDLEVEL used to supply external circuits and may supply the external source for V CORE . |
| 159 | /// SMPS step-down converter forced ON in MR mode. | 159 | /// SMPS step-down converter forced ON in MR mode. |
| 160 | SMPSExternalLDOBypass(SMPSSupplyVoltage), | 160 | SMPSExternalLDOBypass(SMPSSupplyVoltage), |
| 161 | |||
| 162 | /// Power supply configuration from an external source, SMPS disabled and the LDO bypassed. | ||
| 163 | /// V CORE supplied from external source | ||
| 164 | /// SMPS step-down converter disabled and LDO bypassed, voltage monitoring still active. | ||
| 165 | SMPSDisabledLDOBypass, | ||
| 161 | } | 166 | } |
| 162 | 167 | ||
| 163 | /// SMPS step-down converter voltage output level. | 168 | /// SMPS step-down converter voltage output level. |
| @@ -308,6 +313,13 @@ pub(crate) unsafe fn init(config: Config) { | |||
| 308 | w.set_bypass(matches!(config.supply_config, SupplyConfig::SMPSExternalLDOBypass(_))); | 313 | w.set_bypass(matches!(config.supply_config, SupplyConfig::SMPSExternalLDOBypass(_))); |
| 309 | }); | 314 | }); |
| 310 | } | 315 | } |
| 316 | SupplyConfig::SMPSDisabledLDOBypass => { | ||
| 317 | PWR.cr3().modify(|w| { | ||
| 318 | w.set_sden(false); | ||
| 319 | w.set_ldoen(false); | ||
| 320 | w.set_bypass(true); | ||
| 321 | }); | ||
| 322 | } | ||
| 311 | } | 323 | } |
| 312 | } | 324 | } |
| 313 | 325 | ||
