AT32WB415
Series Reference Manual
2022.04.13
Page 253
Ver 2.00
1001
Reserved
1001
Reserved
1010
Reserved
1010
Reserved
1011
Reserved
1011
Reserved
1100
Reserved
1100
Reserved
1101
TMR1_TRGOUT event
1101
TMR1_CH1 event
1110
Reserved
1110
Reserved
1111
Reserved
1111
Reserved
18.4.2.3 Sampling and conversion sequence
The sampling period can be configured by setting the CSPTx bit in the ADC_SPT1 and ADC_SPT2
registers. A single one conversion time is calculated with the following formula:
A single one conversion tiem (ADCCLK period) = sampling time + resolution bits + 12.5
Example:
If the CSPTx selects 1.5 period, then one conversion needs 1.5+12.5=14 ADCCLK periods
If the CSPTx selects 7.5 period, then one conversion needs 7.5+12.5=20 ADCCLK periods.
18.4.3 Conversion sequence management
Only one channel is converted at each trigger event by default, that is, OSN1-defined channel or PSN4-
defined channel.
The detailed conversion sequence modes are described in the following sections. With this, the channels
can be converted in a specific order.
18.4.3.1 Sequence mode
The sequence mode is enabled by setting the SQEN bit in the ADC_CTRL1 register. The ADC_OSQx
registers are used to configure the sequence and total number of the ordinary channels while the
ADC_PSQ register is used to define the sequence and total number of the preempted channels. When
the sequence mode is enabled, a single trigger event enables the conversion of a group of channels in
order. The ordinary channels start converting from the QSN1 while the preempted channels starts from
the PSNx, where x=4-PCLEN. Figure 18-4 shows an example of the behavior in sequence mode.
Figure 18-4
Sequence mode
ADC_IN5
ADC_IN0
ADC_IN5
OCLEN=2, OSN1=ADC_IN5, OSN2=ADC_IN0, OSN3=ADC_IN5
Ordinary channel
trigger
CCE flag set
ADC_IN5
ADC_IN0
ADC_IN5
CCE flag set
Ordinary channel
trigger
ADC_IN4
ADC_IN1
ADC_IN4
PCLEN=2, PSN2=ADC_IN4, PSN3=ADC_IN1, PSN4=ADC_IN4
Preempted channel
trigger
CCE and
PCCE flag set
ADC_IN4
ADC_IN1
ADC_IN4
CCE and
PCCE flag set
Preempted channel
trigger
Sampling
Conversion