![Geehy SEMICONDUCTOR APM32F030x4x6x8xC User Manual Download Page 314](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f030x4x6x8xc/apm32f030x4x6x8xc_user-manual_573629314.webp)
www.geehy.com Page 313
group of channel.
When CMODESEL bit of register ADC_CFG1 is configured to 1, ADC is set to
continuous conversion mode; configure STARTCEN bit of register ADC_CTRL to
1 by software or trigger the event by hardware to enable ADC conversion.
After the conversion of each channel, the converted data will be stored in the
16-bit ADC_DATA register, EOCFLG bit will be set to 1, and if EOCIEN bit is set
to 1, an interrupt will be generated. After the channel sequence conversion,
EOSEQFLG bit will be set to 1, and if EOSEQIEN bit is set to 1, an interrupt will
be generated.
24.3.3.3
Discontinuous mode
Configure DISCEN bit of register ADC_CFG1 to 1, and set ADC to discontinuous
mode; enable ADC conversion by software or by trigger event of hardware. In
this mode, only one channel of one sequence is converted at a time. If DISCEN
bit is cleared, all channels of one sequence will be converted at a time.
Example:
DISCEN bit is set to 1, and the channel sequence is 0, 1, 5
-
1st trigger, Channel 0 is converted and generates an EOCFLG
event
-
2nd trigger, Channel 1 is converted and generates an EOCFLG
event
-
3rd trigger, Channel 5 is converted and generates an EOCFLG
event
DISCEN bit is set to 0, and the channel sequence is 0, 1, 5
-
1st trigger, Channels 0, 1 and 5 are converted in sequence. After
the conversion of each channel, an EOCFLG event will be
generated. After the conversion of the whole sequence, an
EOSEQFLG event will be generated
ADC Channel Classification
24.3.4.1
Analog input channel introduced by GPIO pin
In total 16 channels are connected to ADC_IN0…ADC_IN15.
24.3.4.2
Internal analog input channel
Temperature sensor
(
1
)
The temperature sensor is used to measure the internal temperature of
the chip
(
2
)
The temperature sensor selects ADC1_IN16 input channel
(
3
)
Enable by TSEN bit of configuration register ADC_CCFG
(
4
)
Select sampling time
Internal reference voltage V
REFINT
(
5
)
The internal reference voltage is used to provide a stable voltage output
for ADC
(
6
)
Internal reference voltage V
REFINT
is used to select ADC1_IN17 input
channel
External Trigger and Trigger Polarity
The external trigger event can be selected by EXTTRGSEL bit of configuration
register ADC_CFG1.