GD32W51x User Manual
363
specified in the ADC_RSQ0~ADC_RSQ2 registers or ADC_ISQ register. When the ADCON
is 1, the ADC samples and converts specified channels one by one in the regular or inserted
group till the end of the regular or inserted group, once the corresponding software trigger or
external trigger is active. The conversion data will be stored in the ADC_RDATA or
ADC_IDATAx register. After conversion of the regular or inserted channel group, the EOC or
EOIC will be set. An interrupt will be generated if the EOCIE or EOICIE bit is set. The DMA
bit in ADC_CTL1 register must be set when the regular channel group works in scan mode.
After conversion of a regular channel group, the conversion can be restarted automatically if
the CTN bit in the ADC_CTL1 register is set.
Figure 14-4. Scan conversion mode, continuous disable
CH2
CH1
CH5
CH7
CH11
CH3
CH2
CH1
· · ·
Inserted
trigger
EOC
One circle of regular group, RL=8
CH9
CH10
CH8
CH6
CH9
CH10
· · ·
EOIC
One circle of inserted group, IL=4
Regular
trigger
Sample
Convert
CH4
CH0
Software procedure for scan conversion on a regular channel group:
1. Set the SM bit in the ADC_CTL0 register and the DMA bit in the ADC_CTL1 register;
2. Configure ADC_RSQx and ADC_SAMPTx registers;
3. Configure the ETMRC and ETSRC bits in the ADC_CTL1 register if it is needed;
4. Prepare the DMA module to transfer data from the ADC_RDATA;
5. Set the SWRCST bit, or generate an external trigger for the regular group;
6. Wait for the EOC flag to be set;
7. Clear the EOC flag by writing 0.
Software procedure for scan conversion on an inserted channel group:
1. Set the SM bit in the ADC_CTL0 register;
2. Configure ADC_ISQ and ADC_SAMPTx registers;
3. Configure ETMIC and ETSIC bits in the ADC_CTL1 register if it is needed;
4. Set the SWICST bit, or generate an external trigger for the inserted group;
5. Wait the EOC/EOIC flags to be set;
6. Read the converted result in the ADC_IDATAx register;
7. Clear the EOC/EOIC flag by writing 0 to them.
Содержание GD32W515 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32W51x Arm Cortex M33 32 bit MCU User Manual Revision 1 0 Nov 2021 ...
Страница 66: ...GD32W51x User Manual 66 Bits Fields Descriptions 31 0 UNIQUE_ID 95 64 Unique device ID ...
Страница 389: ...GD32W51x User Manual 389 The FWDGT timeout can be more accurate by calibrating the IRC32K ...
Страница 504: ...GD32W51x User Manual 504 ...
Страница 710: ...GD32W51x User Manual 710 ...