![ARTERY AT32F435 Series Скачать руководство пользователя страница 368](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592368.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 368
Rev 2.03
18.5.1 Data management
In Master/Slave mode, the converted data of ordinary channels is also stored in the ADC_CODT register.
The MSDMASEL bit in the ADC_CCTRL register can be used to select from five DMA
transfer modes, as shown in Table 18-4.
As long as the MSDMASEL is set, the ADC1 DMA
channel is used to generate a DMA request each time the data is ready, and overflow detection on
master/salve is also enabled. Once an overflow event occurs, the ADC will stop conversion, the DMA
request is halted, and loss of synchronization may happen between the master and slave, so it is
recommended to re-initialize ADC before re-triggering on an overflow event.
Table 18-4 Master/slave DMA m ode
MSDMASEL
Master/slave
mode
DMA requests
ADC_CODT[31:0]
001
Single slave
1st
16 bit 0, ADC1_ODT[15:0]
2nd
16 bit 0, ADC2_ODT [15:0]
3rd
16 bit 0, ADC1_ODT [15:0]
Dual slave
1st
16 bit 0, ADC1_ODT[15:0]
2nd
16 bit 0, ADC2_ODT [15:0]
3rd
16 bit 0, ADC3_ODT[15:0]
4th
16 bit 0, ADC1_ODT [15:0]
010
Single slave
1st
ADC2_ODT[15:0], ADC1_ODT[15:0]
2nd
ADC2_ODT[15:0], ADC1_ODT[15:0]
Dual slave
1st
ADC2_ODT[15:0], ADC1_ODT[15:0]
2nd
ADC1_ODT[15:0], ADC3_ODT[15:0]
3rd
ADC3_ODT[15:0], ADC2_ODT[15:0]
4th
ADC2_ODT[15:0], ADC1_ODT[15:0]
011
Single slave
1st
16 bit 0, ADC2_ODT[7:0], ADC1_ODT[7:0]
2nd
16 bit 0, ADC2_ODT[7:0], ADC1_ODT[7:0]
Dual slave
1st
16 bit 0, ADC2_ODT[7:0], ADC1_ODT[7:0]
2nd
16 bit 0, ADC1_ODT[7:0], ADC3_ODT[7:0]
3rd
16 bit 0, ADC3_ODT[7:0], ADC2_ODT[7:0]
4th
16 bit 0, ADC2_ODT[7:0], ADC1_ODT[7:0]
100
Dual slave
1st
8 bit 0, ADC3_ODT[7:0], ADC2_ODT[7:0], ADC1_ODT[7:0]
2nd
8 bit 0, ADC3_ODT[7:0], ADC2_ODT[7:0], ADC1_ODT[7:0]
101
Dual slave
1st
ADC2_ODT[15:0], ADC1_ODT[15:0]
2nd
16 bit 0, ADC3_ODT[15:0]
3rd
ADC2_ODT[15:0], ADC1_ODT[15:0]
MSDRCEN bit in the ADC_CCTRL register can be used to select when to stop DMA request, that is,
when the DMA request remains set until the end of data transfer, or when the DMA transfer register is
reset.
18.5.2 Simultaneous mode
Regular simultaneous mode
MSSEL bit in the ADC_CTRL1 register is used to select regular simultaneous mode. If this mode is
enabled, the regular channels of the master are triggered so that both the master and the slave convert
the regular channels simultaneously. In this mode, it is required to configure the same sampling time and
the same sequence length for the master and slave to avoid the loss of data due to the lack of
synchronization.
Figure 18-14 shows an example of the regular simultaneous mode
The single slave mode can work with the mode 1/2/3 of the transfer mode (MSDMASEL), while the
dual slave mode can work with the mode 1/4/5.
Note: The same channel is not allowed to be sampled by several ADCs simultaneously. Do not put
the same channel in the same sequence location of different ADCs.