#[non_exhaustive]pub struct Config {
pub rcc: Config,
pub enable_debug_during_sleep: bool,
pub enable_independent_io_supply: bool,
pub enable_analog_switch_booster: bool,
pub enable_independent_analog_supply: bool,
pub gpdma_interrupt_priority: Priority,
pub enable_ucpd1_dead_battery: bool,
}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_analog_switch_booster: boolEnable the I/O analog switch voltage booster.
The analog switch between a GPIO and the ADC (or comparator, or operational amplifier) has a much higher resistance when the analog supply is low, which distorts conversions of pin channels unless they are given a much longer sample time. The reference manuals ask for this booster below 2.4 V (2.7 V on the H5, H7 and H7RS). It draws extra current, so it is off by default.
On boards where only VDDA is low and VDD is not, the analog switches can instead be supplied from VDD, which this option does not do.
enable_independent_analog_supply: boolOn the U5 series all analog peripherals are powered by a separate supply.
gpdma_interrupt_priority: PriorityGPDMA interrupt priority.
Defaults to P0 (highest).
enable_ucpd1_dead_battery: boolEnables UCPD1 dead battery functionality.
Defaults to false (disabled).