![ARTERY AT32F435 Series Скачать руководство пользователя страница 365](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592365.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 365
Rev 2.03
Figure 18-10
Ordinary oversampling trigger mode
ADC_IN0
ADC_IN0
OCCE flag set
Non-triggered oversampling mode
:
OOSEN = 1, POSEN = 0,
OOSRSEL
= 0,
OOSTREN
=0
Ordinary
trigger
1
st
2
nd
3
rd
ADC_IN0
Ordinary
OCLEN=1, OSN1=ADC_IN0, OSN2=ADC_IN1
4
th
ADC_IN0
ADC_IN1
ADC_IN1
1
st
2
nd
3
rd
ADC_IN1 4
th
ADC_IN1
ADC_IN0
ADC_IN0
OCCE flag set
Triggered oversampling mode
:
OOSEN = 1, POSEN = 0,
OOSRSEL
= 0,
OOSTREN
=1
Ordinary
trigger
1
st
2
nd
3
rd
ADC_IN0
Ordinary
4
th
ADC_IN0
ADC_IN1
ADC_IN1
1
st
2
nd
3
rd
ADC_IN1
4
th
ADC_IN1
Ordinary
trigger
Ordinary
trigger
Ordinary
trigger
Ordinary
trigger
Ordinary
trigger
Ordinary
trigger
Ordinary
trigger
Sampling
Conversion
18.4.5.2 Oversampling of preempted group of channels
It is possible to use both the preempted oversampling and ordinary oversampling simultaneously or
individually. The oversampling of the preempted group of channels does not affect the ordinary
oversampling modes. Figure 18-11 shows the behavior when the preempted oversampling and ordinary
oversampling trigger mode are used simultaneously in 4x oversampling rate and auto-conversion of
preempted group.
Figure 18-11 Oversam pling of preem pted group of channels
ADC_IN0
ADC_IN0
PCCE flag set
OOSEN = 1, POSEN = 1, OOSRSEL = 0, OOSTREN = 0,
PCAUTOEN = 1, SQEN = 1
Ordinary
trigger
1
st
2
nd
3
rd
ADC_IN0
Ordinary
Preempted
OCLEN=0, OSN1=ADC_IN0
PCLEN=1, PSN3=ADC_IN4, PSN4=ADC_IN5
ADC_IN0
4
th
ADC_IN4
ADC_IN4
1
st
2
nd
3
rd
ADC_IN4
ADC_IN4
4
th
ADC_IN5
ADC_IN5
1
st
2
nd
3
rd
ADC_IN5
ADC_IN5
4
th
OCCE flag set
Sampling
Conversion
18.4.6 Data management
At the end of the conversion of the ordinary group, the converted value is stored in the ADC_ODT register.
Once the preempted group conversion ends, the converted data of the preempted group is stored in the
ADC_PDTx register.
18.4.6.1 Data alignment
DTALIGN bit in the ADC_CTRL2 register selects the alignment of data (right-aligned or left-aligned).
Apart from this, the converted data of the preempted group is decreased by the offset written in the
ADC_PCDTOx register. Thus the result may be a negative value, marked by SIGN.
The data are aligned on a half-word basis expect when the resolution is set to 6-bit. In this case, the
data are aligned on a byte basis, as shown in Figure 18-12.