![GigaDevice Semiconductor GD32E23 Series User Manual Download Page 167](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32e23-series/gd32e23-series_user-manual_2225794167.webp)
GD32E23x User Manual
167
10.4.8.
Sample time configuration
The number of CK_ADC cycles which is used to sample the input voltage can be specified
by the SPTn [2:0] bits in the ADC_SAMPT0 and ADC_SAMPT1 registers. A different
sampling time can be specified for each channel. For 12-bit resolution, the total sampling and
conversion time is “sampling time + 12.5” CK_ADC cycles.
Example:
CK_ADC = 28M
Hz and sampling time is 1.5 cycles, the total conversion time is “1.5+12.5”
CK_ADC cycles, that means 0.500us.
10.4.9.
External trigger configuration
The conversion of routine sequence can be triggered by rising edge of external trigger inputs.
The external trigger source of routine sequence is controlled by the ETSRC[2:0] bits in the
ADC_CTL1 register.
Table 10-3. External trigger source for ADC
ETSRC[2:0]
Trigger Source
Trigger Type
000
TIMER0_CH0
Hardware trigger
001
TIMER0_CH1
010
TIMER0_CH2
011
reserved
100
TIMER2_TRGO
101
TIMER14_CH0
110
EXTI_11
111
SWRCST
Software trigger
10.4.10.
DMA request
The DMA request, which is enabled by the DMA bit in 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
which is specified by the user.
10.4.11.
ADC internal channels
When the TSVREN bit in ADC_CTL1 register is set, the temperature sensor channel
(ADC_IN16) and V
REFINT
channel (ADC_IN17) are 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 17.1µs. When this sensor is not in use, it can be set in
power down mode by resetting the TSVREN bit.