www.geehy.com Page 316
DMA mode is selected by DMACFG bit of configuration register ADC_CFG1:
When DMACFG is 0, DMA is in single mode
-
DMA programming is used to transmit the fixed-length data
-
In this mode, ADC will generate DMA request every time it converts
data effectively. When ADC conversion is restarted, ADC will stop
generating DMA request
When DMACFG is set to 1, DMA is in circular mode
-
DMA programming is in circular mode or double-buffer mode
-
In this mode, when ADC conversion is started again and the
converted data is valid, a DMA request will be generated
Low-power Characteristics
24.3.11.1
Automatic delay conversion mode
This mode is used to simplify the software and optimize the application program
performance during low-speed running, and ADC overrun may occur easily.
Set WAITCEN of configuration register ADC_CFG1 to 1, enable the automatic
delay conversion mode, and new ADC conversion will start only after the data in
ADC data register are read, which is a method of adaptive ADC speed and
adaptive system reading ADC data speed.
24.3.11.2
Automatic shutdown mode
This mode can greatly reduce the application power consumption, and is suitable
for applications with relatively few conversions or long conversion request time
interval. Automatic shutdown mode can be used in combination with automatic
delay conversion mode in low-frequency application.
Automatic shutdown mode can be enabled by setting AOEN bit of configuration
register ADC_CFG1 to 1. When AOEN bit is set to 1 and there is no ADC
conversion, it will be powered off automatically, and when the conversion is
started, ADC will be waken up automatically.
24.4
Register Address Mapping
Table 88 ADC Register Address Mapping
Register name
Description
Offset address
ADC_STS
ADC state register
0x00
ADC_IEN
ADC interrupt enable register
0x04
ADC_CTRL
ADC control register
0x08
ADC_CFG1
ADC configuration register 1
0x0C
ADC_CFG2
ADC configuration register 2
0x10
ADC_SMPTIM
ADC sampling time register
0x14
ADC_AWDT
ADC watchdog threshold register
0x20
ADC_CHSEL
ADC channel selection register
0x28
ADC_DATA
ADC data register
0x40
ADC_CCFG
ADC common configuration register
0x308