Atmel — ADC Driver
This driver supports the AFE (Analog Front-End) Controller available in some Atmel microprocessor variants, e.g. the SAM4E family.
The Atmel AFEC natively supports 12-bit samples, but via digital
averaging 13-, 14-, 15- and 16-bit samples are supported. The
controller also supports “low-resolution” 10-bit samples,
but at the same sampling rate as the native 12-bit samples. When
higher resolution, averaged, samples are used the maximum achievable
sample rate will be lower than the native resolution. The
configuration option specifies the sample resolution to be used.
This driver left-aligns results so that the full-range of the ADC I/O
generic layer defined cyg_adc_sample_t type is used
regardless of the resolution configured for this driver. The default generic
CYGNUM_IO_ADC_SAMPLE_SIZE definition of 16
should be sufficient for most applications.
If system instrumentation is enabled then
option is made available, and can be enabled to allow the ADC device
driver to generate instrumentation. When enabed the
control which events are generated.
Each ADC device is controlled by a CDL
for each device x, which must be enabled to
initialize the device. The number of channels available to a
controller instance is defined by the relevant variant or platform HAL
defines the internal sample size.
defines the channel offset compensation applied to all channels..
defines the default samples-per-second rate for all channels attached
to device x. This default can be over-ridden at
run-time using the generic ADC I/O layer provided support as required.
For each channel x in an AFEC device y the CDL script provides the following configuration options:
If the application needs to access the on-chip ADC
xvia an eCos ADC driver then this option should be enabled.
This option controls the name that an eCos application should use to
access this device via cyg_io_lookup(), open(), or similar calls. This
allows meaningful names to be assigned if required, rather than the
By default input channels are configured in single-ended mode, which
is the normal acquisition mode. This option allows individual channels
to be configured in
Differentialmode, where the input is generated against an adjacent “paired” channel.
- This defines the size of the channel's sample buffer, in cyg_adc_sample_t samples.
|2023-08-15||eCosPro Non-Commercial Public License|