#[non_exhaustive]pub struct Config {
pub hse: Option<Hertz>,
pub bypass_hse: bool,
pub sysclk: Option<Hertz>,
pub hclk: Option<Hertz>,
pub pclk1: Option<Hertz>,
pub pclk2: Option<Hertz>,
pub pll48: bool,
pub adc: Option<AdcClockSource>,
pub adc34: Option<AdcClockSource>,
pub ls: LsConfig,
}
Expand description
Clocks configutation
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.hse: Option<Hertz>
Frequency of HSE oscillator 4MHz to 32MHz
bypass_hse: bool
Bypass HSE for an external clock
sysclk: Option<Hertz>
Frequency of the System Clock
hclk: Option<Hertz>
Frequency of AHB bus
pclk1: Option<Hertz>
Frequency of APB1 bus
- Max frequency 36MHz
pclk2: Option<Hertz>
Frequency of APB2 bus
- Max frequency with HSE is 72MHz
- Max frequency without HSE is 64MHz
pll48: bool
USB clock setup It is valid only when,
- HSE is enabled,
- The System clock frequency is either 48MHz or 72MHz
- APB1 clock has a minimum frequency of 10MHz
adc: Option<AdcClockSource>
ADC clock setup
- For AHB, a psc of 4 or less must be used
adc34: Option<AdcClockSource>
ADC clock setup
- For AHB, a psc of 4 or less must be used
ls: LsConfig
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more