GD32W51x User Manual
365
2. Configure DISNUM [2:0] bits in the ADC_CTL0 register;
3. Configure ADC_RSQx and ADC_SAMPTx registers;
4. Configure the ETMRC and ETSRC bits in the ADC_CTL1 register if it is needed;
5. Prepare the DMA module to transfer data from the ADC_RDATA;
6. Set the SWRCST bit, or generate an external trigger for the regular group;
7. Repeat step6 if it is needed;
8. Wait the EOC flag to be set;
9. Clear the EOC flag by writing 0.
Software procedure for discontinuous conversion on an inserted channel group:
1. Set the DISIC 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. Repeat step4 if it is needed;
6. Wait the EOC/EOIC flags to be set;
7. Read the converted result in the ADC_IDATAx register;
8. Clear the EOC/EOIC flag by writing 0.
14.4.5.
Inserted channel management
Auto-insertion
The inserted group channels are automatically converted after the regular group channels
when the ICA bit in ADC_CTL0 register is set. In this mode, the external trigger on inserted
channels cannot be enabled. A sequence of up to 13 conversions programmed in the
ADC_RSQ0~ADC_RSQ2 and ADC_ISQ registers can be used to convert in this mode. In
addition to the ICA bit, if the CTN bit is also set, regular channels are continuously converted
after inserted channels.
Figure 14-7. Auto-insertion, CTN = 1
CH0
CH1
CH2
CH3
CH4
Sample
Convert
· · ·
CH11
EOIC
EOC
CH0
CH1
Regular
group
Inserted
group
The auto insertion mode can not be enabled when the discontinuous conversion mode is set.
Triggered insertion
If the ICA bit is cleared, the triggered insertion occurs if a software or external trigger occurs
during the regular channel group conversion. In this situation, the ADC aborts the current
conversion and starts the conversion of inserted channelgroup. Aft er the inserted channel
group is done, the regular channel group conversion will resum from the last aborted
Содержание 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 ...