English
Language : 

LM3S5762 Datasheet, PDF (462/841 Pages) Texas Instruments – Stellaris® LM3S5762 Microcontroller
Analog-to-Digital Converter (ADC)
Figure 12-5. Internal Temperature Sensor Characteristic
12.4
12.4.1
12.4.2
Initialization and Configuration
In order for the ADC module to be used, the PLL must be enabled and using a supported crystal
frequency (see the RCC register). Using unsupported frequencies can cause faulty operation in the
ADC module.
Module Initialization
Initialization of the ADC module is a simple process with very few steps. The main steps include
enabling the clock to the ADC, disabling the analog isolation circuit associated with all inputs that
are to be used, and reconfiguring the sample sequencer priorities (if needed).
The initialization sequence for the ADC is as follows:
1. Enable the ADC clock by writing a value of 0x0001.0000 to the RCGC0 register (see page 217).
2. Disable the analog isolation circuit for all ADC input pins that are to be used by writing a 1 to
the appropriate bits of the GPIOAMSEL register (see page 384) in the associated GPIO block.
3. If required by the application, reconfigure the sample sequencer priorities in the ADCSSPRI
register. The default configuration has Sample Sequencer 0 with the highest priority, and Sample
Sequencer 3 as the lowest priority.
Sample Sequencer Configuration
Configuration of the sample sequencers is slightly more complex than the module initialization since
each sample sequence is completely programmable.
The configuration for each sample sequencer should be as follows:
1. Ensure that the sample sequencer is disabled by writing a 0 to 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.
462
November 17, 2011
Texas Instruments-Production Data