![ARTERY AT32F435 Series Скачать руководство пользователя страница 362](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592362.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 362
Rev 2.03
Figure 18-6
Repetition mode
ADC_IN5
ADC_IN0
OCLEN=1, OSN1=ADC_IN5, OSN2=ADC_IN0
Ordinary channel
trigger
OCCE flag set
PCLEN=1, PSN3=ADC_IN14, PSN4=ADC_IN1
ADC_IN14
ADC_IN1
PCCE flag set
ADC_IN5
ADC_IN0
OCCE flag set
ADC_IN14
Sampling
Conversion
18.4.3.4 Partition mode
The partition mode of the ordinary group can be enabled by setting the OCPEN bit in the ADC_CTRL1
register. In this mode, the ordinary group conversion sequence length (OCLEN bit in the ADC_OSQ1
register) is divided into a smaller sub-group, in which the number of the channels is programmed with
the OCPCNT bit in the ADC_CTRL1 register. A single trigger event will enable the conversion of all the
channels in the sub-group. Each trigger event selects different sub-group in order.
Set the PCPEN bit in the ADC_CTRL1 register will enable the partition mode of the preempted group.
In this mode, the preempted group conversion sequence length (OCLEN bit in the ADC_OSQ1 register)
is divided into a sub-group with only one channel. A single one trigger event will enable the conversion
of all the channels in the sub-group. Each trigger event selects different sub-group in order.
The partition mode cannot be used with the repetition mode at the same time. Figure 18-7 shows an
example of the behavior in partition mode for ordinary group and preempted group.
Figure 18-7
Partition mode
ADC_IN5
ADC_IN0
OCLEN=4, OCPCNT=1, OSN1=ADC_IN5, OSN2=ADC_IN0, OSN3=ADC_IN2, OSN4=ADC_IN1, OSN5=ADC_IN7
Ordinary channel
trigger
CCE flag set
PCLEN=2, PSN2=ADC_IN14, PSN3=ADC_IN1, PSN4=ADC_IN13
ADC_IN2
ADC_IN1
ADC_IN7
Ordinary channel
trigger
CCE flag set
ADC_IN5
Ordinary channel
trigger
ADC_IN14
ADC_IN1
Preempted
channel trigger
PCCE flag set
ADC_IN13
ADC_IN14
Preempted
channel trigger
Preempted
channel trigger
Preempted
channel trigger
CCE flag set
Ordinary channel
trigger
ADC_IN0
CCE flag set
Sampling
Conversion
18.4.4 End of conversion
The ADABRT bit in the ADC_CTRL2 register can be used to stop ADC conversions. At the end of the
conversions, the conversion sequence returns to the first channel. This allows the user to configure a
new channel sequence, and the ADC starts conversions from the beginning based on the new order
when a trigger event occurs. Figure 18-8 shows the timing diagram when the ADABRT bit is set.