Basic Operation
861
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
Analog To Digital Converter (ADC) Module
22.2.2.1 Group Trigger Options
The Group1 and Group2 operating mode control registers have an extra control bit: HW_TRIG. This bit
configures the group to be hardware event-triggered instead of software-triggered, which is the default.
When a group is configured to be event-triggered, the group conversion starts when at least one channel
is selected for conversion in this group, and when the defined event trigger occurs. The event trigger
source is defined for each group in the ADEVSRC, ADG1SRC, and the ADG2SRC registers. The actual
connections used as the event trigger sources are defined in the device datasheet for both the ADC
modules.
22.2.2.2 Analog Input Channel Selection Mode Options
The ADC1 module on this device supports two different modes for selecting the analog input channel to
be converted:
•
Sequential channel selection mode (default)
•
Enhanced channel selection mode
NOTE:
ADC2 module only supports the sequential channel selection mode (the default).
22.2.2.2.1 Sequential Channel Selection Mode
This is the default mode and allows the ADC module to be used in a backwards compatible mode to the
ADC module on other Hercules™ ARM® Safety MCUs from Texas Instruments. As discussed in
, an analog input channel can be selected for conversion in one or more conversion
groups by setting the bit corresponding to that channel number in the group's channel select register.
22.2.2.2.2 Enhanced Channel Selection Mode
There are some important concepts related to the enhanced channel selection mode. These are defined
first:
•
Look-Up Table
This is a 32-word deep memory-mapped region used to define the analog input channel number to be
converted. The LUTs for the three groups are stacked together so that the entire LUT occupies 96
words. Each word is aligned on a 32-bit boundary. The LUTs for ADC1 start at FF3E 2000h and the
LUTs for ADC2 start at FF3A 2000h.
•
Conversion Group Sub-Sequence
A group sub-sequence is defined as the conversion for a set of channels that is converted on each
conversion trigger. The number of channels selected for conversion in a group sub-sequence is
defined by the number of bits that are set in the group's channel select register. For example, setting
bits 0, 1, 29 and 31 in ADG1SEL means that each Group1 conversion sub-sequence consists of 4
conversions.
•
LUT Index
A "CURRENT_COUNT" register for each group is maintained as an index into that group's LUT. This
register increments each time a channel conversion is completed. Therefore, as its name suggests, a
read from this register returns the number of conversions completed since the last write to the group's
channel select register. The CURRENT_COUNT register resets to all zeros under any of the following
conditions:
1. The ADC peripheral is reset via a global peripheral reset
2. The ADC peripheral is reset via the ADC Reset Control Register
3. The CURRENT_COUNT becomes equal to the MAX_COUNT defined for that conversion group
4. The application writes zeros to the CURRENT_COUNT register
5. The conversion group's result RAM is reset