#[non_exhaustive]pub struct Config {
pub rcc: Config,
pub rtc: RtcConfig,
pub min_stop_pause: Duration,
pub enable_debug_during_sleep: bool,
pub enable_analog_switch_booster: bool,
pub bdma_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.
rtc: RtcConfigRTC config
min_stop_pause: DurationMinimum time to stop
enable_debug_during_sleep: boolEnable debug during sleep and stop.
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.
bdma_interrupt_priority: PriorityBDMA interrupt priority.
Defaults to P0 (highest).
enable_ucpd1_dead_battery: boolEnables UCPD1 dead battery functionality.
Defaults to false (disabled).