diff options
| author | Bernát Süli <[email protected]> | 2025-12-19 04:15:57 +0100 |
|---|---|---|
| committer | Bernát Süli <[email protected]> | 2025-12-19 04:15:57 +0100 |
| commit | 1c860d4a6e283e24a4609ff8b1ca2cc3cbf2f428 (patch) | |
| tree | f6480fdeb63b3f3d5a278d25754ffd347bd3c7b9 /embassy-stm32/src/rcc/g4.rs | |
| parent | 58cb57aa88ff6caa77087d650068aee367092dc8 (diff) | |
stm32: disable HSI48 if not in use
Diffstat (limited to 'embassy-stm32/src/rcc/g4.rs')
| -rw-r--r-- | embassy-stm32/src/rcc/g4.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/embassy-stm32/src/rcc/g4.rs b/embassy-stm32/src/rcc/g4.rs index da13e16aa..0dd3713c8 100644 --- a/embassy-stm32/src/rcc/g4.rs +++ b/embassy-stm32/src/rcc/g4.rs | |||
| @@ -300,6 +300,12 @@ pub(crate) unsafe fn init(config: Config) { | |||
| 300 | RCC.cr().modify(|w| w.set_hsion(false)); | 300 | RCC.cr().modify(|w| w.set_hsion(false)); |
| 301 | } | 301 | } |
| 302 | 302 | ||
| 303 | // Disable the HSI48, if not used | ||
| 304 | #[cfg(crs)] | ||
| 305 | if config.hsi48.is_none() { | ||
| 306 | super::disable_hsi48(); | ||
| 307 | } | ||
| 308 | |||
| 303 | if config.low_power_run { | 309 | if config.low_power_run { |
| 304 | assert!(sys <= Hertz(2_000_000)); | 310 | assert!(sys <= Hertz(2_000_000)); |
| 305 | PWR.cr1().modify(|w| w.set_lpr(true)); | 311 | PWR.cr1().modify(|w| w.set_lpr(true)); |
