Texas Instruments Development Kit for TM4C129x,Tiva™ ARM® Cortex™ -M4 Microcontroller DK-TM4C129X DK-TM4C129X Datenbogen

Produktcode
DK-TM4C129X
Seite von 2182
18.4.2
Sample Sequencer Configuration
Configuration of the sample sequencers is slightly more complex than the module initialization
because each sample sequencer is completely programmable.
The configuration for each sample sequencer should be as follows:
1.
Ensure that the sample sequencer is disabled by clearing the corresponding
ASENn
bit in the
ADCACTSS register. Programming of the sample sequencers is allowed without having them
enabled. Disabling the sequencer during programming prevents erroneous execution if a trigger
event were to occur during the configuration process.
2.
Configure the trigger event for the sample sequencer in the ADCEMUX register.
3.
When using a PWM generator as the trigger source, use the ADC Trigger Source Select
(ADCTSSEL) 
register to specify in which PWM module the generator is located. The default
register reset selects PWM module 0 for all generators.
4.
For each sample in the sample sequence, configure the corresponding input source in the
ADCSSMUXn and ADCSSEMUXn registers.
5.
For each sample in the sample sequence, configure the sample control bits in the corresponding
nibble in the ADCSSCTLn register. When programming the last nibble, ensure that the
END
bit
is set. Failure to set the
END
bit causes unpredictable behavior.
6.
If interrupts are to be used, set the corresponding
MASK
bit in the ADCIM register.
7.
Enable the sample sequencer logic by setting the corresponding
ASENn
bit in the ADCACTSS
register.
18.5
Register Map
Table 18-6 on page 1221 lists the ADC registers. The offset listed is a hexadecimal increment to the
register's address, relative to that ADC module's base address of:
■ ADC0: 0x4003.8000
■ ADC1: 0x4003.9000
Note that the ADC module clock must be enabled before the registers can be programmed (see
page 412). There must be a delay of 3 system clocks after the ADC module clock is enabled before
any ADC module registers are accessed.
Table 18-6. ADC Register Map
See
page
Description
Reset
Type
Name
Offset
ADC Active Sample Sequencer
0x0000.0000
RW
ADCACTSS
0x000
ADC Raw Interrupt Status
0x0000.0000
RO
ADCRIS
0x004
ADC Interrupt Mask
0x0000.0000
RW
ADCIM
0x008
ADC Interrupt Status and Clear
0x0000.0000
RW1C
ADCISC
0x00C
ADC Overflow Status
0x0000.0000
RW1C
ADCOSTAT
0x010
ADC Event Multiplexer Select
0x0000.0000
RW
ADCEMUX
0x014
1221
December 13, 2013
Texas Instruments-Advance Information
Tiva
TM4C129XNCZAD Microcontroller