#[non_exhaustive]pub struct Config {
pub rcc: Config,
pub enable_debug_during_sleep: bool,
pub enable_independent_io_supply: bool,
pub enable_ulpmen: bool,
pub flash_fast_wakeup: bool,
pub stop_mode_sram: StopModeSramConfig,
pub gpdma_interrupt_priority: Priority,
}Expand description
embassy-stm32 global configuration.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.rcc: ConfigRCC config.
enable_debug_during_sleep: boolEnable debug during sleep and stop.
May increase power consumption. Defaults to true.
enable_independent_io_supply: boolOn low-power boards (eg. stm32l4, stm32l5, stm32wba and stm32u5),
some GPIO pins are powered by an auxiliary, independent power supply (VDDIO2),
which needs to be enabled before these pins can be used.
May increase power consumption. Defaults to true.
enable_ulpmen: boolEnable ultra-low-power BOR0 mode (discontinuous BOR monitoring) in Stop 1 and Standby modes.
This must be set to reach the lowest power consumption in low-power modes.
Constraints:
- Must not be set when autonomous peripherals use HSI as kernel clock.
- Only effective when BOR levels 1-4 and PVD are disabled; when they are enabled, continuous mode applies regardless of this setting.
Defaults to false (disabled).
flash_fast_wakeup: boolEnable flash fast wakeup from Stop 0/1 modes.
When true, flash stays in normal mode during stop (faster wakeup,
higher power). When false (default), flash enters low-power mode
(slower wakeup, lower power).
Defaults to false.
stop_mode_sram: StopModeSramConfigSRAM power-down configuration for Stop modes.
Controls which SRAM pages are powered down when entering Stop 0 or Stop 1 modes. Powered-down pages lose their content but reduce current draw.
Defaults to all SRAM retained.
gpdma_interrupt_priority: PriorityGPDMA interrupt priority.
Defaults to P0 (highest).