![ARTERY AT32F435 Series Reference Manual Download Page 363](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592363.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 363
Rev 2.03
Figure 18-8 ADABRT tim ing diagram
ADC
status
ADC_IN5 conversion
ADABRT
ADC_ODT
Idle
Trigger
Idle
ADC_IN0 conversion
ADC_IN2
conversion
ADC_IN5 conversion
ADC_IN0
conversion
DT
ADABRT set
by software
ADABRT
cleared by
software
Trigger
OCLEN=3, OSN1=ADC_IN5, OSN2=ADC_IN0, OSN3=ADC_IN2
ADC_IN5
DT
ADC_IN0
DT
ADC_IN5
18.4.5 Oversampling
A single oversampling converted data can be done through multiple conversions of the same channel in
which the cumulative converted data is averaged.
Oversampling ratio is selected through the OSRSEL bit in the ADC_OVSP register. This bit is used
to specify the oversampling multiple, which is performed by converting the same channel several
times
Oversampling shift is selected through the OSSSEL bit in the ADC_OVSP register, which is
performed by right shift
If the averaged data is greater than 16 bits, then only pick up the right-aligned 16-bit data and put them
into a 16-bit data register, shown in Table 18-3.
Example:
If 4x oversampling is selected through the OSRSEL bit, then the same channel is converted by four
times in a single oversampling conversion, and the converted data derived from 4 conversions is put
together. If 6-bit resolution is selected through the OSSSE bit, then the cumulative data is divided by 2
6
and rounded up.
Table 18-3 Correlation between m axim um cumulative data, oversampling m ultiple and shift
digits
Oversampling
multiple
2x
4x
8x
16x
32x
64x
128x
256x
Max
cumulative
data
0x1FFE
0x3FFC
0x7FF8
0xFFF0
0x1FFE0
0x3FFC0
0x7FF80
0xFFF00
No shift
0x1FFE
0x3FFC
0x7FF8
0xFFF0
0xFFE0
0xFFC0
0xFF80
0xFF00
Shift 1 digit
0x0FFF
0x1FFE
0x3FFC
0x7FF8
0xFFF0
0xFFE0
0xFFC0
0xFF80
Shift 2 digits
0x0800
0x0FFF
0x1FFE
0x3FFC
0x7FF8
0xFFF0
0xFFE0
0xFFC0
Shift 3 digits
0x0400
0x0800
0x0FFF
0x1FFE
0x3FFC
0x7FF8
0xFFF0
0xFFE0
Shift 4 digits
0x0200
0x0400
0x0800
0x0FFF
0x1FFE
0x3FFC
0x7FF8
0xFFF0
Shift 5 digits
0x0100
0x0200
0x0400
0x0800
0x0FFF
0x1FFE
0x3FFC
0x7FF8
Shift 6 digits
0x0080
0x0100
0x0200
0x0400
0x0800
0x0FFF
0x1FFE
0x3FFC
Shift 7 digits
0x0040
0x0080
0x0100
0x0200
0x0400
0x0800
0x0FFF
0x1FFE
Shift 8 digits
0x020
0x0040
0x0080
0x0100
0x0200
0x0400
0x0800
0x0FFF
When using oversampling conversion mode, the DTALIGN and PCDTOx are ignored, and data must be
right aligned. The CRSEL bit is used to select the desired oversampling resolution only, without changing
the data operation mode.