The devices embed
up to two analog-to-digital converter
s (ADC).
- ADC1 and ADC2 are tightly coupled and can operate in dual mode (ADC1 is the master).
Each ADC consists of one 12-bit successive approximation analog-to-digital converter. Each ADC has up to 14 multiplexed channels. A/D conversion of the various channels can be performed in single, continuous, scan, or discontinuous mode. The result of the ADC is stored in a left‑aligned or right‑aligned (default configuration) 32‑bit data register.
The ADCs are mapped on the AHB bus to allow fast data handling. The analog watchdog features allow the application to detect if the input voltage goes outside the user‑defined high or low thresholds.
A built-in hardware oversampler improves analog performance while off‑loading the related computational burden from the CPU. An efficient low‑power mode is implemented to allow very low consumption at low frequency.
The ADC main features are:
- High-performance features:
- Up to two ADCs which can operate in dual mode
- ADC1 is connected to 12 external channels and two internal channels.
- ADC2 is connected to 14 external channels.
- 12, 10, 8, or 6-bit configurable resolution
- ADC conversion time independent from the AHB bus clock frequency
- Faster conversion time by lowering resolution
- AHB slave bus interface to allow fast data handling
- Channel-wise programmable sampling time
- Flexible sampling time control
- Fixed latency for a trigger to start of sampling
- Up to four injected channels (analog inputs assignment to regular or injected channels is fully configurable)
- Data alignment with in-built data coherency
- Data can be managed by DMA for regular channel conversions
- Four dedicated data registers for the injected channels
- Low-power features:
- Speed adaptive low-power mode to reduce ADC consumption when operating at low frequency
- Allows slow bus frequency application while keeping optimum ADC performance
- Provides automatic control to avoid ADC overrun in low AHB bus clock frequency application (autodelayed mode)
- Oversampler:
- 32-bit data register
- Oversampling ratio adjustable from 2 to 1024
- Programmable data right and left shifts
- Data preconditioning:
- Gain compensation
- Offset compensation
- Analog input channels:
- External analog inputs (per ADC): up to 14 GPIO pads
- One channel for the internal reference voltage (VREFINT)
- One channel for the internal temperature sensor (VSENSE)
- Start-of-conversion can be initiated:
- By software for both regular and injected conversions
- By hardware triggers with configurable polarity (internal timer events or GPIO input events) for both regular and injected conversions
- Conversion modes:
- Each ADC can convert a single channel or can scan a sequence of channels
- Single mode converts selected inputs once per trigger
- Continuous mode converts selected inputs continuously
- Discontinuous mode
- Interrupt generation at ADC ready, the end of sampling, the end of conversion (regular or injected), end of sequence conversion (regular or injected), analog watchdog 1, 2, or 3, or overrun events
- Three analog watchdogs per ADC
- ADC input range: VSSA ≤ VIN ≤ VREF+
Table 5. ADC features| ADC modes/features | ADC1 | ADC2 |
|---|
| Resolution | 12 bits |
| Maximum sampling-speed | 2.25 Msps |
| Hardware-offset calibration | X |
| Single-ended inputs | X |
| Injected channel conversion | X |
| Oversampling | up to x1024 |
| Data register | 32 bits |
| DMA support | X |
| Offset compensation | X |
| Gain compensation | X |
| Number of analog watchdogs | 3 |