Struct kea_hal::clocks::ics::SystemClock[][src]

pub struct SystemClock<Source, FLL, LowPower> { /* fields omitted */ }
Expand description

struct that represents the state of the System Clock output ICSOUT

Implementations

In FBILP mode

Can only transition to FBI mode

In FBELP mode

Can only transition to FBE mode

Transition from any non-lowpower mode

Transition from any non-lowpower mode

Technically, fbi mode isn’t active until CLKST shows it. It’s up to the caller to decide if they want to wait

Transition from any non-lowpower mode.

Transition from any non-lowpower mode

Technically, fbe mode isn’t active until CLKST shows it. It’s up to the caller to decide if they want to wait

In FBE or FBI mode, depending on Source

Transition to FBELP or FBILP mode, whichever is the low power version of the current mode.

If in FBE mode, calling this method will transition to FBELP. Likewise for FBI and FBILP.

Any Internal mode (cannot be set in FEE, FBE, or FBELP mode)

Set the RDIV value

RDIV divides the output of the external reference clock by powers of 2. RDIV_OUT = OSC_OUT / (2 ** n + 1) The value at reset is 0 (RDIV_OUT = OSC_OUT)

Note that per RDIV definition (pg272 in ICS_C1 of KEA64 ref man) this cannot be changed while the SystemClock is in FEE or FBE mode. To use set this first, then transition to FBE or FEE mode.

Any External mode (cannot be set in FEI, FBI, or FBILP)

Enable/Disable Clock Monitor.

When enabled, the MCU will reset if it loses the external clock signal

For any state of SystemClock

Set the BDIV value

BDIV divides the output of the ICS (in any mode) by powers of 2. ICSOUT = CLKSoutput / (2 ** n + 1) The value at reset is 1 (ICSOUT = CLKSoutput / 2)

Note that by default the bus clock and system clock run at the same multiplier, but the max bus clock is 20MHz. SIM_BUSDIV must be set appropriately to ensure this limit is not exceeded before BDIV is set to 1.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.