Struct rp_pac::otp_data_raw::regs::BootselPllCfg
source · #[repr(transparent)]pub struct BootselPllCfg(pub u32);
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: u32
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) -> u16
pub const fn refdiv(&self) -> u16
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: u16)
pub fn set_refdiv(&mut self, val: u16)
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 moresource§impl Default for BootselPllCfg
impl Default for BootselPllCfg
source§fn default() -> BootselPllCfg
fn default() -> BootselPllCfg
source§impl PartialEq for BootselPllCfg
impl PartialEq for BootselPllCfg
impl Copy for BootselPllCfg
impl Eq for BootselPllCfg
impl StructuralPartialEq for BootselPllCfg
Auto Trait Implementations§
impl Freeze for BootselPllCfg
impl RefUnwindSafe for BootselPllCfg
impl Send for BootselPllCfg
impl Sync for BootselPllCfg
impl Unpin for BootselPllCfg
impl UnwindSafe for BootselPllCfg
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)