#[repr(transparent)]pub struct BootselPllCfg(pub u16);
Expand description
Optional PLL configuration for BOOTSEL mode. (ECC) This should be configured to produce an exact 48 MHz based on the crystal oscillator frequency. User mode software may also use this value to calculate the expected crystal frequency based on an assumed 48 MHz PLL output. If no configuration is given, the crystal is assumed to be 12 MHz. The PLL frequency can be calculated as: PLL out = (XOSC frequency / (REFDIV+1)) x FBDIV / (POSTDIV1 x POSTDIV2) Conversely the crystal frequency can be calculated as: XOSC frequency = 48 MHz x (REFDIV+1) x (POSTDIV1 x POSTDIV2) / FBDIV (Note the +1 on REFDIV is because the value stored in this OTP location is the actual divisor value minus one.) Used if and only if ENABLE_BOOTSEL_NON_DEFAULT_PLL_XOSC_CFG is set in BOOT_FLAGS0. That bit should be set only after this row and BOOTSEL_XOSC_CFG are both correctly programmed.
Tuple Fields§
§0: u16
Implementations§
Source§impl BootselPllCfg
impl BootselPllCfg
Sourcepub fn set_postdiv1(&mut self, val: u8)
pub fn set_postdiv1(&mut self, val: u8)
PLL post-divide 1 divisor, in the range 1..7 inclusive.
Sourcepub fn set_postdiv2(&mut self, val: u8)
pub fn set_postdiv2(&mut self, val: u8)
PLL post-divide 2 divisor, in the range 1..7 inclusive.
Sourcepub const fn refdiv(&self) -> bool
pub const fn refdiv(&self) -> bool
PLL reference divisor, minus one. Programming a value of 0 means a reference divisor of 1. Programming a value of 1 means a reference divisor of 2 (for exceptionally fast XIN inputs)
Sourcepub fn set_refdiv(&mut self, val: bool)
pub fn set_refdiv(&mut self, val: bool)
PLL reference divisor, minus one. Programming a value of 0 means a reference divisor of 1. Programming a value of 1 means a reference divisor of 2 (for exceptionally fast XIN inputs)
Trait Implementations§
Source§impl Clone for BootselPllCfg
impl Clone for BootselPllCfg
Source§fn clone(&self) -> BootselPllCfg
fn clone(&self) -> BootselPllCfg
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more