------------- Registers -- -------------
ADC_Periph : aliased ADC_Peripheral
with Import, Address => ADC_Base;
type ADC_Peripheral is record
CS : aliased CS_Register;
RESULT : aliased RESULT_Register;
FCS : aliased FCS_Register;
FIFO : aliased FIFO_Register;
DIV : aliased DIV_Register;
INTR : aliased INTR_Register;
INTE : aliased INTE_Register;
INTF : aliased INTF_Register;
INTS : aliased INTS_Register;
end record;
Result of most recent ADC conversion
FIFO control and status
Conversion result FIFO
Clock divider. If non-zero, CS_START_MANY will start conversions\n at regular intervals rather than back-to-back.\n The divider is reset when either of these fields are written.\n Total period is 1 + INT + FRAC / 256
Raw Interrupts
Interrupt Enable
Interrupt Force
Interrupt status after masking & forcing
subtype CS_AINSEL_Field is HAL.UInt3;
type CS_Register is record
EN : Boolean := False;
TS_EN : Boolean := False;
START_ONCE : Boolean := False;
START_MANY : Boolean := False;
Reserved_4_7 : HAL.UInt4 := 16#0#;
READY : Boolean := False;
ERR : Boolean := False;
ERR_STICKY : Boolean := False;
Reserved_11_11 : HAL.Bit := 16#0#;
AINSEL : CS_AINSEL_Field := 16#0#;
Reserved_15_15 : HAL.Bit := 16#0#;
RROBIN : CS_RROBIN_Field := 16#0#;
Reserved_21_31 : HAL.UInt11 := 16#0#;
end record;
Power on temperature sensor. 1 - enabled. 0 - disabled.
After a write operation all bits in the field are cleared (set to zero). Start a single conversion. Self-clearing. Ignored if start_many is asserted.
Continuously perform conversions whilst this bit is 1. A new conversion will start immediately after the previous finishes.
unspecified
Read-only. 1 if the ADC is ready to start a new conversion. Implies any previous conversion has completed.\n 0 whilst conversion in progress.
Read-only. The most recent ADC conversion encountered an error; result is undefined or noisy.
Write data bit of one shall clear (set to zero) the corresponding bit in the field. Some past ADC conversion encountered an error. Write 1 to clear.
unspecified
Select analog mux input. Updated automatically in round-robin mode.
unspecified
Round-robin sampling. 1 bit per channel. Set all bits to 0 to disable.\n Otherwise, the ADC will cycle through each enabled channel in a round-robin fashion.\n The first channel to be sampled will be the one currently indicated by AINSEL.\n AINSEL will be updated after each conversion with the newly-selected channel.
unspecified
subtype CS_RROBIN_Field is HAL.UInt5;
subtype DIV_FRAC_Field is HAL.UInt8;
subtype DIV_INT_Field is HAL.UInt16;
type DIV_Register is record
FRAC : DIV_FRAC_Field := 16#0#;
INT : DIV_INT_Field := 16#0#;
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record;
Integer part of clock divisor.
unspecified
subtype FCS_LEVEL_Field is HAL.UInt4;
type FCS_Register is record
EN : Boolean := False;
SHIFT : Boolean := False;
ERR : Boolean := False;
DREQ_EN : Boolean := False;
Reserved_4_7 : HAL.UInt4 := 16#0#;
EMPTY : Boolean := False;
FULL : Boolean := False;
UNDER : Boolean := False;
OVER : Boolean := False;
Reserved_12_15 : HAL.UInt4 := 16#0#;
LEVEL : FCS_LEVEL_Field := 16#0#;
Reserved_20_23 : HAL.UInt4 := 16#0#;
THRESH : FCS_THRESH_Field := 16#0#;
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record;
If 1: FIFO results are right-shifted to be one byte in size. Enables DMA to byte buffers.
If 1: conversion error bit appears in the FIFO alongside the result
If 1: assert DMA requests when FIFO contains data
unspecified
Read-only.
Read-only.
Write data bit of one shall clear (set to zero) the corresponding bit in the field. 1 if the FIFO has been underflowed. Write 1 to clear.
Write data bit of one shall clear (set to zero) the corresponding bit in the field. 1 if the FIFO has been overflowed. Write 1 to clear.
unspecified
Read-only. The number of conversion results currently waiting in the FIFO
unspecified
DREQ/IRQ asserted when level >= threshold
unspecified
subtype FCS_THRESH_Field is HAL.UInt4;
type FIFO_Register is record
VAL : FIFO_VAL_Field;
Reserved_12_14 : HAL.UInt3;
ERR : Boolean;
Reserved_16_31 : HAL.UInt16;
end record;
unspecified
Read-only. 1 if this particular sample experienced a conversion error. Remains in the same location if the sample is shifted.
unspecified
subtype FIFO_VAL_Field is HAL.UInt12;
type INTE_Register is record
FIFO : Boolean := False;
Reserved_1_31 : HAL.UInt31 := 16#0#;
end record;
unspecified
type INTF_Register is record
FIFO : Boolean := False;
Reserved_1_31 : HAL.UInt31 := 16#0#;
end record;
unspecified
type INTR_Register is record
FIFO : Boolean;
Reserved_1_31 : HAL.UInt31;
end record;
unspecified
type INTS_Register is record
FIFO : Boolean;
Reserved_1_31 : HAL.UInt31;
end record;
unspecified
type RESULT_Register is record
RESULT : RESULT_RESULT_Field;
Reserved_12_31 : HAL.UInt20;
end record;
unspecified
subtype RESULT_RESULT_Field is HAL.UInt12;