Enum SystemClockSource

Source
pub enum SystemClockSource {
    RcsysAt115kHz,
    RC1M,
    RCFAST {
        frequency: RcfastFrequency,
    },
    ExternalOscillator {
        frequency: OscillatorFrequency,
        startup_mode: OscillatorStartup,
    },
    PllExternalOscillatorAt48MHz {
        frequency: OscillatorFrequency,
        startup_mode: OscillatorStartup,
    },
    DfllRc32kAt48MHz,
    RC80M,
}
Expand description

Which source the system clock should be generated from.

These are specified as system clock source appended with the clock that it is sourced from appended with the final frequency of the system. So for example, one option is to use the DFLL sourced from the RC32K with a final frequency of 48 MHz.

When new options (either sources or final frequencies) are needed, they should be added to this list, and then the setup_system_clock function can be modified to support it. This is necessary because configurations must be changed not just with the input source but also based on the desired final frequency.

For options utilizing an external oscillator, the configurations for that oscillator must also be provided.

Variants§

§

RcsysAt115kHz

Use the RCSYS clock (which the system starts up on anyways). Final system frequency will be 115 kHz. Note that while this is the default, Tock is NOT guaranteed to work on this setting and will likely fail.

§

RC1M

§

RCFAST

Fields

§

ExternalOscillator

Use an external crystal oscillator as the direct source for the system clock. The final system frequency will match the frequency of the external oscillator.

Fields

§startup_mode: OscillatorStartup
§

PllExternalOscillatorAt48MHz

Use an external crystal oscillator as the input to the internal phase locked loop (PLL) for the system clock. This results in a final frequency of 48 MHz.

Fields

§startup_mode: OscillatorStartup
§

DfllRc32kAt48MHz

Use the internal digital frequency locked loop (DFLL) sourced from the internal RC32K clock. Note this typically requires calibration of the RC32K to have a consistent clock. Final frequency of 48 MHz.

§

RC80M

Trait Implementations§

Source§

impl Clone for SystemClockSource

Source§

fn clone(&self) -> SystemClockSource

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SystemClockSource

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for SystemClockSource

Source§

fn eq(&self, other: &SystemClockSource) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for SystemClockSource

Source§

impl StructuralPartialEq for SystemClockSource

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.