------------- 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,
LOW,
MEDIUM,
TOOHIGH,
HIGH)
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 ENABLE\n The system clock must be switched to another source before setting this field to DISABLE otherwise the chip will lock up\n The 12-bit code is intended to give some protection against accidental writes. An invalid setting will enable the oscillator.
unspecified
type DIV_DIV_Field is
DIV_DIV_Field_Reset,
PASS)
with Size => 12;
type DIV_Register is record
DIV : DIV_DIV_Field := DIV_DIV_Field_Reset;
Reserved_12_31 : HAL.UInt20 := 16#0#;
end record;
unspecified
subtype FREQA_DS0_Field is HAL.UInt3;
subtype FREQA_DS1_Field is HAL.UInt3;
subtype FREQA_DS2_Field is HAL.UInt3;
subtype FREQA_DS3_Field is HAL.UInt3;
type FREQA_PASSWD_Field is
FREQA_PASSWD_Field_Reset,
PASS)
with Size => 16;
type FREQA_Register is record
DS0 : FREQA_DS0_Field := 16#0#;
Reserved_3_3 : HAL.Bit := 16#0#;
DS1 : FREQA_DS1_Field := 16#0#;
Reserved_7_7 : HAL.Bit := 16#0#;
DS2 : FREQA_DS2_Field := 16#0#;
Reserved_11_11 : HAL.Bit := 16#0#;
DS3 : FREQA_DS3_Field := 16#0#;
Reserved_15_15 : HAL.Bit := 16#0#;
PASSWD : FREQA_PASSWD_Field := FREQA_PASSWD_Field_Reset;
end record;
unspecified
Stage 1 drive strength
unspecified
Stage 2 drive strength
unspecified
Stage 3 drive strength
unspecified
Set to 0x9696 to apply the settings\n Any other value in this field will set all drive strengths to 0
subtype FREQB_DS4_Field is HAL.UInt3;
subtype FREQB_DS5_Field is HAL.UInt3;
subtype FREQB_DS6_Field is HAL.UInt3;
subtype FREQB_DS7_Field is HAL.UInt3;
type FREQB_PASSWD_Field is
FREQB_PASSWD_Field_Reset,
PASS)
with Size => 16;
type FREQB_Register is record
DS4 : FREQB_DS4_Field := 16#0#;
Reserved_3_3 : HAL.Bit := 16#0#;
DS5 : FREQB_DS5_Field := 16#0#;
Reserved_7_7 : HAL.Bit := 16#0#;
DS6 : FREQB_DS6_Field := 16#0#;
Reserved_11_11 : HAL.Bit := 16#0#;
DS7 : FREQB_DS7_Field := 16#0#;
Reserved_15_15 : HAL.Bit := 16#0#;
PASSWD : FREQB_PASSWD_Field := FREQB_PASSWD_Field_Reset;
end record;
unspecified
Stage 5 drive strength
unspecified
Stage 6 drive strength
unspecified
Stage 7 drive strength
unspecified
Set to 0x9696 to apply the settings\n Any other value in this field will set all drive strengths to 0
subtype PHASE_PASSWD_Field is HAL.UInt8;
type PHASE_Register is record
SHIFT : PHASE_SHIFT_Field := 16#0#;
FLIP : Boolean := False;
ENABLE : Boolean := True;
PASSWD : PHASE_PASSWD_Field := 16#0#;
Reserved_12_31 : HAL.UInt20 := 16#0#;
end record;
invert the phase-shifted output\n this is ignored when div=1
enable the phase-shifted output\n this can be changed on-the-fly
set to 0xaa\n any other value enables the output with shift=0
unspecified
subtype PHASE_SHIFT_Field is HAL.UInt2;
type RANDOMBIT_Register is record
RANDOMBIT : Boolean;
Reserved_1_31 : HAL.UInt31;
end record;
unspecified
ROSC_Periph : aliased ROSC_Peripheral
with Import, Address => ROSC_Base;
type ROSC_Peripheral is record
CTRL : aliased CTRL_Register;
FREQA : aliased FREQA_Register;
FREQB : aliased FREQB_Register;
DORMANT : aliased HAL.UInt32;
DIV : aliased DIV_Register;
PHASE : aliased PHASE_Register;
STATUS : aliased STATUS_Register;
RANDOMBIT : aliased RANDOMBIT_Register;
COUNT : aliased COUNT_Register;
end record;
The FREQA & FREQB registers control the frequency by controlling the drive strength of each stage\n The drive strength has 4 levels determined by the number of bits set\n Increasing the number of bits set increases the drive strength and increases the oscillation frequency\n 0 bits set is the default drive strength\n 1 bit set doubles the drive strength\n 2 bits set triples drive strength\n 3 bits set quadruples drive strength
For a detailed description see freqa register
Ring Oscillator pause control\n This is used to save power by pausing the ROSC\n On power-up this field is initialised to WAKE\n An invalid write will also select WAKE\n Warning: setup the irq before selecting dormant mode
Controls the output divider
Controls the phase shifted output
Ring Oscillator Status
This just reads the state of the oscillator output so randomness is compromised if the ring oscillator is stopped or run at a harmonic of the bus frequency
A down counter running at the ROSC 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.
type STATUS_Register is record
Reserved_0_11 : HAL.UInt12 := 16#0#;
ENABLED : Boolean := False;
Reserved_13_15 : HAL.UInt3 := 16#0#;
DIV_RUNNING : Boolean := False;
Reserved_17_23 : HAL.UInt7 := 16#0#;
BADWRITE : Boolean := False;
Reserved_25_30 : HAL.UInt6 := 16#0#;
STABLE : Boolean := False;
end record;
Read-only. Oscillator is enabled but not necessarily running and stable\n this resets to 0 but transitions to 1 during chip startup
unspecified
Read-only. post-divider is running\n this resets to 0 but transitions to 1 during chip startup
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 FREQA or FREQB or DIV or PHASE or DORMANT
unspecified
Read-only. Oscillator is running and stable