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
frequency: RcfastFrequency
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.
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.
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
impl Clone for SystemClockSource
Source§fn clone(&self) -> SystemClockSource
fn clone(&self) -> SystemClockSource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more