------------- Registers -- -------------
subtype COUNT_COUNT_Field is HAL.UInt8;
type COUNT_Register is record
COUNT : COUNT_COUNT_Field := 16#0#;
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record;
unspecified
type CTRL_ENABLE_Field is
CTRL_ENABLE_Field_Reset,
DISABLE,
ENABLE)
with Size => 12;
type CTRL_FREQ_RANGE_Field is
CTRL_FREQ_RANGE_Field_Reset,
Val_1_15MHZ,
RESERVED_1,
RESERVED_2,
RESERVED_3)
with Size => 12;
type CTRL_Register is record
FREQ_RANGE : CTRL_FREQ_RANGE_Field := CTRL_FREQ_RANGE_Field_Reset;
ENABLE : CTRL_ENABLE_Field := CTRL_ENABLE_Field_Reset;
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record;
On power-up this field is initialised to DISABLE and the chip runs from the ROSC.\n 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.\n The 12-bit code is intended to give some protection against accidental writes. An invalid setting will enable the oscillator.
unspecified
subtype STARTUP_DELAY_Field is HAL.UInt14;
type STARTUP_Register is record
DELAY_k : STARTUP_DELAY_Field := 16#C4#;
Reserved_14_19 : HAL.UInt6 := 16#0#;
X4 : Boolean := False;
Reserved_21_31 : HAL.UInt11 := 16#0#;
end record;
unspecified
Multiplies the startup_delay by 4. This is of little value to the user given that the delay can be programmed directly.
unspecified
type STATUS_FREQ_RANGE_Field is
(Val_1_15MHZ,
RESERVED_1,
RESERVED_2,
RESERVED_3)
with Size => 2;
type STATUS_Register is record
FREQ_RANGE : STATUS_FREQ_RANGE_Field := RP2040_SVD.XOSC.Val_1_15MHZ;
Reserved_2_11 : HAL.UInt10 := 16#0#;
ENABLED : Boolean := False;
Reserved_13_23 : HAL.UInt11 := 16#0#;
BADWRITE : Boolean := False;
Reserved_25_30 : HAL.UInt6 := 16#0#;
STABLE : Boolean := False;
end record;
unspecified
Read-only. Oscillator is enabled but not necessarily running and stable, resets to 0
unspecified
Write data bit of one shall clear (set to zero) the corresponding bit in the field. An invalid value has been written to CTRL_ENABLE or CTRL_FREQ_RANGE or DORMANT
unspecified
Read-only. Oscillator is running and stable
XOSC_Periph : aliased XOSC_Peripheral
with Import, Address => XOSC_Base;
type XOSC_Peripheral is record
CTRL : aliased CTRL_Register;
STATUS : aliased STATUS_Register;
DORMANT : aliased HAL.UInt32;
STARTUP : aliased STARTUP_Register;
COUNT : aliased COUNT_Register;
end record;
Crystal Oscillator Status
Crystal Oscillator pause control\n This is used to save power by pausing the XOSC\n On power-up this field is initialised to WAKE\n An invalid write will also select WAKE\n WARNING: stop the PLLs before selecting dormant mode\n WARNING: setup the irq before selecting dormant mode
Controls the startup delay
A down counter running at the xosc frequency which counts to zero and stops.\n To start the counter write a non-zero value.\n Can be used for short software pauses when setting up time sensitive hardware.