Type Alias rp2040_pac::xosc::ctrl::W

source ·
pub type W = W<CTRL_SPEC>;
Expand description

Register CTRL writer

Aliased Type§

struct W { /* private fields */ }

Implementations§

source§

impl W

source

pub fn freq_range(&mut self) -> FREQ_RANGE_W<'_, CTRL_SPEC>

Bits 0:11 - Frequency range. This resets to 0xAA0 and cannot be changed.

source

pub fn enable(&mut self) -> ENABLE_W<'_, CTRL_SPEC>

Bits 12:23 - On power-up this field is initialised to DISABLE and the chip runs from the ROSC.
If the chip has subsequently been programmed to run from the XOSC then setting this field to DISABLE may lock-up the chip. If this is a concern then run the clk_ref from the ROSC and enable the clk_sys RESUS feature.
The 12-bit code is intended to give some protection against accidental writes. An invalid setting will enable the oscillator.

source

pub unsafe fn bits(&mut self, bits: u32) -> &mut Self

Writes raw bits to the register.

§Safety

Passing incorrect value can cause undefined behaviour. See reference manual