Analog-to-digital converters (ADC)
RM0365
295/1080
DocID025202 Rev 7
1. On STM32F302x6/8, this channel is available on ADC1 only.
2. STM32F302x6/8 devices only.
3. On STM32F302xB/CD/E devices only.
4. On STM32F302x6/8/D/E devices.
15.3.5 Slave
AHB
interface
The ADCs implement an AHB slave port for control/status register and data access. The
features of the AHB interface are listed below:
•
Word (32-bit) accesses
•
Single cycle response
•
Response to all read/write accesses to the registers with zero wait states.
The AHB slave interface does not support split/retry requests, and never generates AHB
errors.
15.3.6
ADC voltage regulator (ADVREGEN)
The sequence below is required to start ADC operations:
1.
Enable the ADC internal voltage regulator (refer to the ADC voltage regulator enable
sequence).
2. The software must wait for the startup time of the ADC voltage regulator
(T
ADCVREG_STUP
) before launching a calibration or enabling the ADC. This
temporization must be implemented by software. T
ADCVREG_STUP
is equal to 10 µs in
the worst case process/temperature/power supply.
After ADC operations are complete, the ADC is disabled (ADEN=0).
It is possible to save power by disabling the ADC voltage regulator (refer to the ADC voltage
regulator disable sequence).
Note:
When the internal voltage regulator is disabled, the internal analog calibration is kept.
ADVREG enable sequence
To enable the ADC voltage regulator, perform the sequence below:
1.
Change ADVREGEN[1:0] bits from ‘10’ (disabled state, reset state) into ‘00’.
2. Change ADVREGEN[1:0] bits from ‘00’ into ‘01’ (enabled state).
ADVREG disable sequence
To disable the ADC voltage regulator, perform the sequence below:
1.
Change ADVREGEN[1:0] bits from ‘01’ (enabled state) into ‘00’.
2. Change ADVREGEN[1:0] bits from ‘00’ into ‘10’ (disabled state)
15.3.7
Single-ended and differential input channels
Channels can be configured to be either single-ended input or differential input by writing
into bits DIFSEL[15:1] in the ADCx_DIFSEL register. This configuration must be written
while the ADC is disabled (ADEN=0). Note that DIFSEL[18:16] are fixed to single ended
channels (internal channels only) and are always read as 0.
In single-ended input mode, the analog voltage to be converted for channel “i” is the
difference between the external voltage ADC_IN
i
(positive input) and V
REF-
(negative input).