AT32WB415
Series Reference Manual
2022.04.13
Page 255
Ver 2.00
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_IN17
Ordinary channel
trigger
CCE flag set
PCLEN=2, PSN2=ADC_IN4, PSN3=ADC_IN1, PSN4=ADC_IN3
ADC_IN2
ADC_IN1
ADC_IN17
Ordinary channel
trigger
CCE flag set
ADC_IN5
Ordinary channel
trigger
ADC_IN4
ADC_IN1
Preempted
channel trigger
PCCE flag set
ADC_IN13
ADC_IN4
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 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.4.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, as shown in
Figure 18-8 Data alignment
SIGN
SIGN
SIGN
SIGN DT[11] DT[10] DT[9]
DT[8]
DT[7]
DT[6]
DT[5]
DT[4]
DT[3]
DT[2]
DT[1]
DT[0]
SIGN DT[11] DT[10] DT[9]
DT[8]
DT[7]
DT[6]
DT[5]
DT[4]
DT[3]
DT[2]
DT[1]
DT[0]
0
0
0
0
0
0
0
DT[11] DT[10] DT[9]
DT[8]
DT[7]
DT[6]
DT[5]
DT[4]
DT[3]
DT[2]
DT[1]
DT[0]
DT[11] DT[10]
DT[9]
DT[8]
DT[7]
DT[6]
DT[5]
DT[4]
DT[3]
DT[2]
DT[1]
DT[0]
0
0
0
0
Preempted channel data 12 bits
Right-alignment
Ordinary channel data 12 bits
Right-alignment
Left-alignment
Left-alignment
18.4.4.2 Data read
Read access to the ADC_ODT register using CPU or DMA gets the converted data of the ordinary group.
Read access to the ADC_PDTx register using CPU gets the converted data of the preempted group.
When the OCDMAEN bit is set in the ADC_CTRL2 register, the ADC will issue DMA requests each time
the ADC_OTD register is updated.