Analog to Digital Converter (ADC)
Description:
This function will set the configuration of the ADC for one step of a sample sequence. The
ADC can be configured for single-ended or differential operation (the
ADC_CTL_D
bit selects
differential operation when set), the channel to be sampled can be chosen (the
ADC_CTL_CH0
through
ADC_CTL_CH23
values), and the internal temperature sensor can be selected (the
ADC_CTL_TS
bit). Additionally, this step can be defined as the last in the sequence (the
ADC_CTL_END
bit) and it can be configured to cause an interrupt when the step is complete
(the
ADC_CTL_IE
bit). If the digital comparators are present on the device, this step may also
be configured to send the ADC sample to the selected comparator using
ADC_CTL_CMP0
through
ADC_CTL_CMP7
. The configuration is used by the ADC at the appropriate time when
the trigger for this sequence occurs.
Note:
If the Digitial Comparator is present and enabled using the
ADC_CTL_CMP0
through
ADC_CTL_CMP7
selects, the ADC sample will NOT be written into the ADC sequence data
FIFO.
The
ui32Step
parameter determines the order in which the samples are captured by the ADC when
the trigger occurs. It can range from zero to seven for the first sample sequence, from zero to three
for the second and third sample sequence, and can only be zero for the fourth sample sequence.
Differential mode only works with adjacent channel pairs (for example, 0 and 1). The channel select
must be the number of the channel pair to sample (for example,
ADC_CTL_CH0
for 0 and 1, or
ADC_CTL_CH1
for 2 and 3) or undefined results are returned by the ADC. Additionally, if differential
mode is selected when the temperature sensor is being sampled, undefined results are returned
by the ADC.
It is the responsibility of the caller to ensure that a valid configuration is specified; this function does
not check the validity of the specified configuration.
Returns:
None.
5.2.1.25 ROM_ADCSequenceUnderflow
Determines if a sample sequence underflow occurred.
Prototype:
int32_t
ROM_ADCSequenceUnderflow(uint32_t ui32Base,
uint32_t ui32SequenceNum)
ROM Location:
ROM_APITABLE
is an array of pointers located at
0x0100.0010
.
ROM_ADCTABLE
is an array of pointers located at
ROM_APITABLE[5]
.
ROM_ADCSequenceUnderflow
is a function pointer located at
ROM_ADCTABLE[11]
.
Parameters:
ui32Base
is the base address of the ADC module.
ui32SequenceNum
is the sample sequence number.
Description:
This determines if a sample sequence underflow has occurred. This will happen if too many
samples are read from the FIFO.
April 8, 2013
51
Summary of Contents for Tiva TM4C123GH6PM
Page 26: ...Boot Loader 26 April 8 2013...
Page 68: ...Controller Area Network CAN 68 April 8 2013...
Page 122: ...Hibernation Module 122 April 8 2013...
Page 136: ...Inter Integrated Circuit I2C 136 April 8 2013...
Page 152: ...Memory Protection Unit MPU 152 April 8 2013...
Page 174: ...Pulse Width Modulator PWM Returns None 174 April 8 2013...
Page 196: ...Synchronous Serial Interface SSI 196 April 8 2013...
Page 222: ...System Control 222 April 8 2013...
Page 270: ...UART 270 April 8 2013...
Page 296: ...uDMA Controller 296 April 8 2013...
Page 351: ...April 8 2013 351...