GD32F403xx User Manual
199
ETSRC[2:0]
Trigger Source
Trigger Type
100
TIMER2_TRGO
101
TIMER3_CH3
110
EXTI11/
TIMER7_TRGO
111
SWRCST
Software trigger
Table 12-4. External trigger source for ADC2
ETSRC[2:0]
Trigger Source
Trigger Type
000
TIMER2_CH0
Hardware rigger
001
reserved
010
TIMER0_CH2
011
TIMER7_CH0
100
TIMER7_TRGO
101
reserved
110
reserved
111
SWRCST
Software trigger
12.4.10.
DMA request
The DMA request, which is enabled by the DMA bit of ADC_CTL1 register, is used to transfer
data of routine sequence for conversion of more than one channel. The ADC generates a
DMA request at the end of conversion of a routine channel. When this request is received,
the DMA will transfer the converted data from the ADC_RDATA register to the destination
location which is specified by the user.
12.4.11.
ADC internal channels
When the TSVREN bit of ADC_CTL1 register is set, the temperature sensor channel
(ADC0_CH16) and V
REFINT
channel (ADC0_CH17) is enabled. The temperature sensor can
be used to measure the ambient temperature of the device. The sensor output voltage can
be converted into a digital value by ADC. The sampling time for the temperature sensor is
recommended to be set to at least t
s_temp
µs (please refer to the datasheet). When this sensor
is not in use, it can be put in power down mode by resetting the TSVREN bit.
The output voltage of the temperature sensor changes linearly with temperature. Because
there is an offset, which is up to 45 °C and varies from chip to chip due to the chip production
process variation, the internal temperature sensor is more appropriate to
detect temperature
variations instead of absolute temperature. When it is used to detect accurate temperature,
an external temperature sensor part should be used to calibrate the offset error.
The internal voltage reference (V
REFINT
) provides a stable (bandgap) voltage output for the
ADC and Comparators. V
REFINT
is internally connected to the ADC0_CH17 input channel.
To use the temperature sensor:
1.
Configure the conversion sequence (ADC_IN16) and the sampling time (t
s_temp
μs)