23. Analog-to-digital converters (ADC)
23.1 ADC introduction
This section describes the implementation of up to 2 ADCs:
- • ADC1 and ADC2 are tightly coupled and can operate in dual mode (ADC1 is master)
Each ADC consists of one 12-bit successive approximation analog-to-digital converter.
Each ADC has up to 19 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 allows improving analog performances 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.
23.2 ADC main features
- • High-performance features
- – Up to 2 ADCs which can operate in dual mode
- – ADC1 is connected to 15 external channels + 4 internal channels
- – ADC2 is connected to 13 external channels + 6 internal 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
- – Offset calibration support
- – Channel-wise programmable sampling time
- – Flexible sampling time control
- – Fixed latency for a trigger to start of sampling
- – Up to 4 injected channels (analog inputs assignment to regular or injected channels is fully configurable)
- – Hardware assistant to prepare the context of the injected channels to allow fast context switching
- – Data alignment with in-built data coherency
- – Data can be managed by DMA for regular channel conversions
- – Data can be routed to ADF for post processing
- – 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 15 GPIO pads
- – 1 channel for the internal reference voltage ( \( V_{REFINT} \) )
- – 1 channel for the internal temperature sensor ( \( V_{SENSE} \) )
- – 1 channel for monitoring the external VBAT power supply pin
- – 1 channel for monitoring \( V_{CORE} \) internal voltage
- – Connection to DAC internal channels
- • 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
- • 3 analog watchdogs per ADC
- • ADC input range: \( V_{SSA} \leq V_{IN} \leq V_{REF+} \)
Figure 165 shows the block diagram of one ADC.
23.3 ADC implementation
Table 203. ADC features| ADC modes/features | ADC1, ADC2 |
|---|---|
| Resolution | 12 bits |
| Maximum sampling speed | 2 Msps (12-bit resolution) |
| Dual mode operation | X |
| Offset calibration | X |
| Single-end input | X |
| Differential input | - |
| Injected channel conversion | X |
| Oversampling | up to x1024 |
| Data register | 32 bits |
| DMA support | X |
| Parallel data output to ADF | X |
| Offset compensation | X |
| Gain compensation | X |
| Number of analog watchdog | 3 |
23.4 ADC functional description
23.4.1 ADC block diagram
Figure 165 shows the ADC block diagram and Table 204 gives the ADC pin description.
Figure 165. ADC block diagram

The block diagram illustrates the internal architecture of the ADC. At the top, the Analog supply (VDDA) and VREF+ pins are connected to the Bias & Ref block. The ADC_INI pin is connected to the Input selection & scan control block. The Input selection & scan control block receives various control signals: SWTRIG , BULB , SMPTRIG , JAUTO , JLEN[1:0] , JSQx[4:0] , LEN[3:0] , SQx[4:0] , and CONT . It also receives VIN[i] from the analog input channels . The Input selection & scan control block is connected to the SAR ADC block. The SAR ADC block also receives DEEPPWD , ADVREGEN (via a REG block), ADEN/ADDIS , CALFACT[6:0] , ADCAL , VIN , and SMPx[2:0] (sampling time) signals. The SAR ADC block outputs CONVERTED DATA to the Start & Stop Control block and to the Oversampler / Offset / Gain block. The Start & Stop Control block receives AUTDLY , ADSTP , ADSTART , JADSTART , and JADSTP signals and controls the SW trigger . The Oversampler / Offset / Gain block receives OVERMOD (overrun mode) and RES[1:0] (12, 10, 8, 6 bits) signals and outputs RDATA[31:0] , JDATA1[31:0] , JDATA2[31:0] , JDATA3[31:0] , and JDATA4[31:0] to the AHB interface . The AHB interface block receives ADRDY , EOSMP , EOC , EOS , OVR , JEOS , JEOC , and AWDx signals and outputs adc_it , adc_dma , and adc_dat[15:0] signals. It also receives DMNGT , DAMDF , adc_ker_ck , and adc_hclk signals. The Oversampling options block includes ROVSM , TROVS , OVSS[3:0] , OVSR[9:0] , JOVSE , ROVSE , OFFSET[21:0] , POSOFF , USAT , SSAT , OFFSETy_CH[4:0] , GCOMP , and GCOMPCOEFF[13:0] signals. The DISCEN , DISCNUM[2:0] (Discontinuous mode) signals are connected to the SAR ADC block. The EXTEN[1:0] (trigger enable and edge selection) and EXTSEL[4:0] (trigger selection) signals are connected to the Start & Stop Control block. The JEXTEN[1:0] (trigger enable and edge selection) and JEXTSEL[4:0] (trigger selection) signals are connected to the Start & Stop Control block. The EXTI mapped at product level and JEXTI mapped at product level signals are connected to the Start & Stop Control block. The Analog watchdog 1,2,3 block receives AWD1 , AWD2 , and AWD3 signals and outputs adc_awk1 , adc_awk2 , and adc_awk3 signals. The AWD1EN , JAWD1EN , AWD1SGL , AWD1CH[4:0] , AWD1_LTR.LTR[22:0] , AWD1_HTR.HTR[22:0] , AWDFILT[2:0] , AWD2CH[19:0] , AWD2_LTR.LTR[22:0] , AWD2_HTR.HTR[22:0] , AWD3CH[19:0] , AWD3_LTR.LTR[22:0] , and AWD3_HTR.HTR[22:0] signals are connected to the Analog watchdog 1,2,3 block. The JDISCEN , JQDIS , and JQM signals are connected to the SAR ADC block. The VREF- pin is connected to the SAR ADC block. The adc_ext0_trg , adc_ext1_trg , adc_ext2_trg , adc_ext29_trg , adc_ext30_trg , and adc_ext31_trg signals are connected to the Start & Stop Control block. The adc_jext0_trg , adc_jext1_trg , adc_jext2_trg , adc_jext29_trg , adc_jext30_trg , and adc_jext31_trg signals are connected to the Start & Stop Control block.
MSV71256V3
23.4.2 ADC pins and internal signals
Table 204. ADC input/output pins
| Pin name | Signal type | Description |
|---|---|---|
| VDDA | Input, analog supply | Analog power supply |
| VSSA | Input, analog supply ground | Ground for analog power supply, equal to V SS . |
| VREF+ | Input, analog reference positive | The higher/positive reference voltage for the ADC. |
| ADCx_INi | External analog input signals | 19 external analog input channels (refer to Section 23.4.4: ADC connectivity for details) |
Table 205. ADC internal input/output signals
| Internal signal name | Signal type | Description |
|---|---|---|
| V INi | Analog input channels | Internal analog input channels connected either to ADCx_INi external channels or to internal channels |
| adc_ext_trgi | Inputs | ADC external trigger inputs for regular conversions. These inputs are shared between the ADC master and the ADC slave. |
| adc_jext_trgi | Inputs | ADC external trigger inputs for the injected conversions. These inputs are shared between the ADC master and the ADC slave. |
| adc_awdy | Output | Internal analog watchdog output signal connected to on-chip timers. (y = Analog watchdog number 1,2,3) |
| adc_ker_ck | Input | ADC kernel clock |
| adc_hclk | Input | ADC peripheral clock |
| adc_it | Output | ADC interrupt |
| adc_dma | Output | ADC DMA request |
| adc_dat[15:0] | Output | ADC data outputs |
Table 206. ADC1/2 interconnection
| Signal name | Source/destination |
|---|---|
| ADC1 VIN[0], ADC2 VIN[0] | VREFINT (output voltage from internal reference voltage) |
| ADC1 VIN[16], ADC2 VIN[16] | VBAT/4 (VBAT pin input voltage divided by 4) |
| ADC1 VIN[17], ADC2 VIN[17] | VSENSE (internal temperature sensor output voltage) |
| ADC1 VIN[18], ADC2 VIN[18] | VCORE (internal logic core voltage) |
| ADC2 VIN[14] | dac1_out1 (DAC internal channel 1) |
| ADC2 VIN[15] | dac1_out2 (DAC internal channel 2) |
Table 206. ADC1/2 interconnection (continued)
| Signal name | Source/destination |
|---|---|
| adc_dat1[15:0] | adf_adc1_dat[15:0] |
| adc_dat2[15:0] (1) | adf_adc2_dat[15:0] |
| adc_ext_trg0 | tim1_oc1 |
| adc_ext_trg1 | tim1_oc2 |
| adc_ext_trg2 | tim1_oc3 |
| adc_ext_trg3 | tim2_oc2 |
| adc_ext_trg4 | tim3_trgo |
| adc_ext_trg5 | tim4_oc4 |
| adc_ext_trg6 | exti11 |
| adc_ext_trg7 | tim8_trgo (1) |
| adc_ext_trg8 | tim8_trgo2 (1) |
| adc_ext_trg9 | tim1_trgo |
| adc_ext_trg10 | tim1_trgo2 |
| adc_ext_trg11 | tim2_trgo |
| adc_ext_trg12 | tim4_trgo |
| adc_ext_trg13 | tim6_trgo |
| adc_ext_trg14 | tim15_trgo |
| adc_ext_trg15 | tim3_oc4 |
| adc_ext_trg16 | exti15 |
| adc_ext_trg17 | Reserved |
| adc_ext_trg18 | lptim1_ch1 |
| adc_ext_trg19 | lptim2_ch1 |
| adc_ext_trg20 | lptim3_ch1 |
| adc_ext_trg21 | lptim4_out |
| adc_ext_trg22 | Reserved |
| adc_ext_trg23 | Reserved |
| adc_ext_trg24 | Reserved |
| adc_ext_trg25 | Reserved |
| adc_ext_trg26 | Reserved |
| adc_ext_trg27 | Reserved |
| adc_ext_trg28 | Reserved |
| adc_ext_trg29 | Reserved |
| adc_ext_trg30 | Reserved |
| adc_ext_trg31 | Reserved |
| adc_jext_trg0 | tim1_trgo |
Table 206. ADC1/2 interconnection (continued)
| Signal name | Source/destination |
|---|---|
| adc_jext_trg1 | tim1_oc4 |
| adc_jext_trg2 | tim2_trgo |
| adc_jext_trg3 | tim2_oc1 |
| adc_jext_trg4 | tim3_oc4 |
| adc_jext_trg5 | tim4_trgo |
| adc_jext_trg6 | exti15 |
| adc_jext_trg7 | tim8_oc4 (1) |
| adc_jext_trg8 | tim1_trgo2 |
| adc_jext_trg9 | tim8_trgo (1) |
| adc_jext_trg10 | tim8_trgo2 (1) |
| adc_jext_trg11 | tim3_oc3 |
| adc_jext_trg12 | tim3_trgo |
| adc_jext_trg13 | tim3_oc1 |
| adc_jext_trg14 | tim6_trgo |
| adc_jext_trg15 | tim15_trgo |
| adc_jext_trg16 | Reserved |
| adc_jext_trg17 | Reserved |
| adc_jext_trg18 | lptim1_ch2 |
| adc_jext_trg19 | lptim2_ch2 |
| adc_jext_trg20 | lptim3_ch1 |
| adc_jext_trg21 | lptim4_out |
| adc_jext_trg22 | Reserved |
| adc_jext_trg23 | Reserved |
| adc_jext_trg24 | Reserved |
| adc_jext_trg25 | Reserved |
| adc_jext_trg26 | Reserved |
| adc_jext_trg27 | Reserved |
| adc_jext_trg28 | Reserved |
| adc_jext_trg29 | Reserved |
| adc_jext_trg30 | Reserved |
| adc_jext_trg31 | Reserved |
- 1. This connection is available only on STM32U3B5/3C5 devices.
23.4.3 ADC clocks
Dual clock domain architecture
The dual clock-domain architecture means that the ADC kernel clock is independent from the AHB bus clock that is used to access ADC registers.
The
adc_ker_ck
input clock can be selected between different clock sources (see
Figure 166: ADC clock scheme
). This selection is done in the RCC (refer to section
Reset and clock control (RCC)
for more information):
- 1. The ADC clock can be provided by an internal or external clock source, which is independent and asynchronous from the AHB clock.
- 2. The ADC clock can be derived from AHB clock (selected in RCC).
Option 1 has the advantage of achieving the maximum ADC clock frequency whatever the AHB clock scheme selected.
Option 2 corresponds to a pseudosynchronous clock. This can be useful when the ADC is triggered by a timer and the application requires that the ADC is accurately triggered without any uncertainty (otherwise, an uncertainty of the trigger instant time is added by the resynchronizations between the two clock domains). This accurate trigger is supported only by
trgo
or
trgo2
timer triggers.
The clock is configured through the RCC and must be compliant with the operating frequency specified in the device datasheet.
Figure 166. ADC clock scheme

graph LR
subgraph RCC [RCC (Reset and clock controller)]
direction TB
adc_hclk[adc_hclk]
adc_ker_ck[adc_ker_ck]
end
subgraph ADC12 [ADC12]
direction TB
AHB[AHB interface]
ADC[Analog ADC1, 2]
end
adc_hclk --> AHB
adc_ker_ck --> ADCClock ratio constraint between ADC clock and AHB clock
There are no constraints to respect for the ratio between the ADC clock and the AHB clock. However, the ratio must be carefully chosen to avoid any overrun especially if the clock AHB is much slower than the ADC clock.
When
adc_hclk
operates at a higher frequency than
adc_ker_ck
, writing to the AHB register does not immediately update the ADC configuration due to clock domain crossing delays.
To guarantee that the configuration is properly applied within the adc_ker_ck domain, it is necessary to wait for four adc_ker_ck clock cycles after the AHB register update.
23.4.4 ADC connectivity
ADC inputs are connected to external channels as well as internal sources as described below.
Figure 167. ADC1 connectivity
![Schematic diagram of ADC1 connectivity showing 19 channels (VIN[0] to VIN[18]) connected to a SAR ADC1 block. Channels include external pins ADC1_IN1 to ADC1_IN15, and internal sources VREFINT, VBAT/4, VSENSE, and VCORE. A 'Channel selection' switch is shown for each channel input.](/RM0487-STM32U3/dda015e0936ac7c03bc9d1e847a6d31e_img.jpg)
The diagram illustrates the internal connectivity of the ADC1 block. It features 19 input channels labeled \( V_{IN}[0] \) through \( V_{IN}[18] \) . Each channel has a switch labeled 'Channel selection' that can connect it to the input of the SAR ADC1 block. The connections are as follows:
- \( V_{IN}[0] \) : Connected to \( V_{REFINT} \) .
- \( V_{IN}[1] \) to \( V_{IN}[13] \) : Connected to external pins \( ADC1\_IN1 \) through \( ADC1\_IN14 \) (pins 1 to 14).
- \( V_{IN}[14] \) : Connected to external pin \( ADC1\_IN14^{(1)} \) (pin 15).
- \( V_{IN}[15] \) : Connected to external pin \( ADC1\_IN15^{(1)} \) (pin 16).
- \( V_{IN}[16] \) : Connected to internal source \( V_{BAT}/4 \) .
- \( V_{IN}[17] \) : Connected to internal source \( V_{SENSE} \) .
- \( V_{IN}[18] \) : Connected to internal source \( V_{CORE} \) .
The SAR ADC1 block is shown on the right with its input \( V_{IN} \) receiving signals from the selected channels. It also has reference voltage inputs \( V_{REF+} \) and \( V_{REF-} \) . The diagram is labeled MSV71257V2 at the bottom right.
Figure 168. ADC2 connectivity
![ADC2 connectivity diagram showing 19 input channels (VIN[0] to VIN[18]) connected to a SAR ADC2 block. The diagram includes external connections like VREFINT, ADC2_IN1-13, dac1_out1-2, VBAT/4, VSENSE, and VCORE. The SAR ADC2 block also shows VREF+ and VREF- inputs.](/RM0487-STM32U3/f136d91a83e2015a322fe245a213ac32_img.jpg)
The diagram illustrates the internal connectivity of the ADC2 module. A central vertical bus contains 19 input nodes labeled \( V_{IN}[0] \) through \( V_{IN}[18] \) . Each node is connected to an external pin or internal signal via a switch. The connections are as follows:
- \( V_{IN}[0] \) : \( V_{REFINT} \)
- \( V_{IN}[1] \) : \( ADC2\_IN1 \)
- \( V_{IN}[2] \) : \( ADC2\_IN2 \)
- \( V_{IN}[3] \) : \( ADC2\_IN3 \)
- \( V_{IN}[4] \) : \( ADC2\_IN4 \)
- \( V_{IN}[5] \) : \( ADC2\_IN5 \)
- \( V_{IN}[6] \) : \( ADC2\_IN6 \)
- \( V_{IN}[7] \) : \( ADC2\_IN7 \)
- \( V_{IN}[8] \) : \( ADC2\_IN8 \)
- \( V_{IN}[9] \) : \( ADC2\_IN9 \)
- \( V_{IN}[10] \) : \( ADC2\_IN10 \)
- \( V_{IN}[11] \) : \( ADC2\_IN11 \)
- \( V_{IN}[12] \) : \( ADC2\_IN12 \)
- \( V_{IN}[13] \) : \( ADC2\_IN13 \)
- \( V_{IN}[14] \) : \( dac1\_out1 \)
- \( V_{IN}[15] \) : \( dac1\_out2 \)
- \( V_{IN}[16] \) : \( V_{BAT}/4 \)
- \( V_{IN}[17] \) : \( V_{SENSE} \)
- \( V_{IN}[18] \) : \( V_{CORE} \)
On the right side, a 'Channel selection' block (represented by a dashed vertical line) selects one of these 19 channels and connects it to the \( V_{IN} \) input of a 'SAR ADC2' block. The SAR ADC2 block also has \( V_{REF+} \) and \( V_{REF-} \) inputs. The diagram is labeled 'MSv71258V2' in the bottom right corner.
23.4.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 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 it can generate AHB error in case of wrong HSIZE.
23.4.6 ADC Deep-power-down mode (DEEPPWD) and ADC voltage regulator (ADVREGEN)
By default, the ADC is in deep-power-down mode where its supply voltage is internally switched off to reduce the leakage currents (the reset state of the DEEPPWD bit is 1 in the ADC_CR register).
To activate the ADC, first exit the Deep-power-down mode by clearing the DEEPPWD bit.
Then, it is mandatory to enable the ADC internal voltage regulator by setting the ADVREGEN bit of the ADC_CR register. 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 delay must be implemented by software. For the startup time of the ADC voltage regulator, refer to the device datasheet for \( T_{ADCVREG\_STUP} \) parameter.
When ADC operations are complete, the ADC can be disabled by clearing the ADEN bit of the ADC_CR register. Power can then be saved by disabling the ADC voltage regulator (by clearing ADVREGEN).
Additional power can be saved by entering ADC Deep-power-down mode again (by setting DEEPPWD of ADC_CR register). This is particularly interesting before entering Stop mode.
Note: Setting DEEPPWD automatically disables the ADC voltage regulator and the ADVREGEN bit is automatically cleared.
When the internal voltage regulator is disabled (ADVREGEN cleared), the internal analog calibration is kept.
In ADC Deep-power-down mode (DEEPPWD = 1), the internal analog calibration is lost and it is necessary to either relaunch a calibration or reapply the calibration factor, which was previously saved (refer to Section Calibration ).
23.4.7 Calibration (ADCAL)
A software calibration is required before launching the ADC. During the calibration procedure, the ADC calculates a calibration factor, which is applied internally to the ADC until the next ADC power-off. During the calibration, the application must not use the ADC and must wait until the calibration is complete.
The calibration is preliminary to any ADC operation. It removes the offset error, which may vary from chip to chip due to process, voltage and temperature variation.
The calibration is initiated by software by setting the ADCAL bit. It can be initiated only when all the following conditions are met:
- • The ADC voltage regulator is enabled (ADVREGEN = 1 and LDORDY = 1).
- • The ADC is disabled (ADEN = 0).
The ADCAL bit stays at 1 during all the calibration sequence. It is then deasserted by hardware as soon as the calibration completes. At this time, the calibration factor can be read from the bits 6 to 0 of the ADC_DR register. The internal analog calibration is kept if the ADC is disabled (ADEN = 0). However, when the ADC operating conditions change (the main contributor to ADC offset variations is \( V_{DDA} \) , and the temperature to a lesser extent), rerun a calibration cycle. It is recommended to recalibrate the ADC when the \( V_{DDA} \) voltage changed more than 10%.
The internal analog calibration is lost in the following cases:
- • The ADC power is removed (for example, when the product enters standby mode). Still, to avoid spending time recalibrating the ADC, it is possible to save and restore the calibration factor by software (provided the temperature and voltage are stable during the ADC power-down).
- • The ADC is reset.
The calibration factor can be written if the ADC is enabled but no conversions are ongoing (ADEN = 1 and ADSTART = 0). Then, at the next start of conversion, the calibration factor is automatically injected into the analog ADC. This loading is transparent and does not add any cycle latency to the start of the conversion.
Software procedure to calibrate the ADC
- 1. Ensure ADEN = 0, ADVREGEN = 1, AUTOFF = 0, DEEPPWD = 0, and DMAEN = 0.
- 2. Set ADCAL.
- 3. Wait until ADCAL = 0 (or until EOICAL = 1). This can be handled by interrupt if the interrupt is enabled by setting the EOICALIE bit of the ADC_IER register.
- 4. The calibration factor can be read from bits 6 to 0 of the ADC_DR or ADC_CALFACT register.
Figure 169. ADC calibration

The diagram illustrates the timing of the ADC calibration process. It features three horizontal timelines:
- ADCAL: Shows a pulse that goes high (initiated by software, marked with an upward arrow and 'by SW') and returns low (deasserted by hardware, marked with a downward arrow and 'by HW'). The duration of this pulse is labeled \( t_{CAB} \) .
- ADC State: Shows a sequence of states: OFF, Startup, CALIBRATE, and OFF. The transition from OFF to Startup is triggered by the rising edge of the ADCAL pulse. The transition from CALIBRATE to OFF occurs when the ADCAL pulse falls.
- ADC_DR[6:0] and ADC_CALFACT[6:0]: These registers are shown to contain the value 0x00 during the Startup and CALIBRATE phases. Upon the falling edge of the ADCAL pulse, the value in these registers is updated to the 'CALIBRATION FACTOR'.
A legend at the bottom left indicates that an upward arrow represents a software-initiated event ('by SW') and a downward arrow represents a hardware-initiated event ('by HW'). The identifier MSv33703V2 is present in the bottom right corner of the diagram area.
Software procedure to force the calibration factor
- 1. Ensure ADEN and ADSTART = 0 (ADC started with no conversion ongoing).
- 2. Program the saved calibration factor to the ADC_CALFACT register.
- 3. The calibration factor is used as soon as a new conversion is launched.
Figure 170. Calibration factor forcing
![Timing diagram showing ADC state, internal calibration factor, start conversion, WRITE ADC_CALFACT, and CALFACT[6:0] signals over time. It illustrates the sequence for forcing a calibration factor: 1. ADC is in 'Ready (not converting)' state. 2. WRITE ADC_CALFACT is asserted (low pulse) to write factor F2. 3. CALFACT[6:0] changes from F1 to F2. 4. Start conversion is triggered (hardware or software). 5. ADC enters 'Converting channel (Single ended)' state. 6. Internal calibration factor is updated to F2. 7. ADC returns to 'Ready' state. 8. Another conversion is started. A legend indicates 'by S/W' for software triggers and 'by H/W' for hardware triggers.](/RM0487-STM32U3/694d58b0bf848d93e8c1e28667f71d11_img.jpg)
23.4.8 ADC on-off control (ADEN, ADDIS, ADRDY)
First, follow the procedure described in Section 23.4.6: ADC Deep-power-down mode (DEEPPWD) and ADC voltage regulator (ADVREGEN) .
Once DEEPPWD is cleared and ADVREGEN is set, the ADC can be enabled. It requires a \( t_{STAB} \) stabilization time before starting converting accurately (see Figure 171 ).
Two control bits enable or disable the ADC:
- • Set ADEN to enable the ADC. The ADRDY flag is set once the ADC is ready for operation.
- • Set ADDIS to disable the ADC. ADEN and ADDIS are automatically deasserted by hardware as soon as the analog ADC is effectively disabled.
Regular conversions can then start either by setting ADSTART (refer to Section 23.4.19: Conversion on external trigger and trigger polarity (EXTSEL, EXTEN, JEXTSEL, JEXTEN) ) or when an external trigger event occurs if regular triggers are enabled.
Injected conversions start by setting JADSTART or when an external injected trigger event occurs, if injected triggers are enabled.
Software procedure to enable the ADC
- 1. Clear the ADRDY bit in the ADC_ISR register by programming it to 1.
- 2. Set ADEN.
- 3. Wait until ADRDY = 1 (ADRDY is set after the ADC startup time). This can be done by using the associated interrupt (ADRDYIE must be set).
- 4. Clear the ADRDY bit in the ADC_ISR register by programming it to 1 (optional).
Software procedure to disable the ADC
- 1. Check that both ADSTART = 0 and JADSTART = 0 to ensure that no conversion is ongoing. If required, stop all regular and injected ongoing conversions by setting ADSTP and JADSTP. Then wait until ADSTP = 0 and JADSTP = 0.
- 2. Set ADDIS.
- 3. If required by the application, wait for ADEN = 0, until the analog ADC is effectively disabled (ADDIS is automatically reset once ADEN = 0).
Figure 171. Enabling/disabling the ADC

MSv62472V1
23.4.9 Constraints when writing the ADC control bits
The software is allowed to write the RCC control bits to configure and enable the ADC clock (refer to RCC section) and configure the ADEN bit in the ADC_CR register, only if the ADC is disabled (ADEN must be cleared).
The software can write the ADSTART, JADSTART and ADDIS control bits in the ADC_CR register only if the ADC is enabled and there is no pending request to disable the ADC (ADEN must be equal to 1 and ADDIS to 0).
The following constraints apply to all the other control bits of the ADC_CFGRx, ADC_SMPRx, ADC_TRy, ADC_SQRY, ADC_JDRy, ADC_OFRy, ADC_OFCHRY and ADC_IER registers:
- • For control bits related to configuration of regular conversions, the software is allowed to write them only if no regular conversions are ongoing (ADSTART must be cleared).
- • For control bits related to configuration of injected conversions, the software is allowed to write them only if no injected conversions are ongoing (JADSTART must be cleared).
- • ADC_TRy register thresholds can be modified when an analog-to-digital conversion is ongoing (refer to Section 23.4.29: Analog window watchdog (AWD1EN, JAWD1EN, AWD1SGL, AWD1CH, AWDCH of ADC_AWD2CR and ADC_AWD3CR, HTR, LTR, AWDFILT) for details).
- • To modify the all above control bits when the software trigger function is used, an ADSTP or JADSTP must be issued to make sure all activities are stopped, even if ADSTART and JADSTART are cleared.
The software is allowed to write the ADSTP or JADSTP control bits in the ADC_CR register only if the ADC is enabled and if there is no pending request to disable the ADC. In addition, the software can write the ADC_JSQR register, when injected queue are disabled by JQDIS = 1, only if JADSTART is cleared and no injected conversion is ongoing. Refer to Section 23.7.14: ADC injected sequence register (ADC_JSQR) for additional details.
Note: Not all forbidden write accesses to ADC control bits are protected by hardware. In some cases, the ADC state may become unknown. To recover from this situation, the ADC must be disabled (ADEN = 0 as well as all the bits of the ADC_CR register).
23.4.10 Channel selection (ADC_SQRy, ADC_JSQR)
The ADC features up to 19 multiplexed channels per ADC, out of which:
- • Up to 15 analog inputs coming from GPIO pads (ADCx_IN[i]). Depending on the device, not all of them are available on GPIO pads.
- • The ADC is connected to up to 6 internal analog inputs:
- – internal reference voltage ( \( V_{REFINT} \) )
- – Internal temperature sensor ( \( V_{SENSE} \) )
- – \( V_{BAT} \) monitoring channel ( \( V_{BAT}/4 \) )
- – \( V_{CORE} \) voltage
- – DAC internal channel
To convert one of the internal analog channels, the corresponding analog sources must first be enabled by programming VREFEN, TSEN, VBATEN in the ADCC_CCR registers, or by enabling the corresponding bit in the ADC option register (ADC_OR) .
Refer to ADC interconnection tables in Section 23.4.2: ADC pins and internal signals for the connection of the above internal analog inputs to ADC pins.
The conversions can be organized in two groups: regular and injected. A group consists of a sequence of conversions that can be done on any channel and in any order. For instance, it is possible to implement the conversion sequence in the following order: ADCx_IN3, ADCx_IN8, ADCx_IN2, ADCx_IN2, ADCx_IN0, ADCx_IN2, and ADCx_IN2.
- • A regular group is composed of up to 16 conversions. The regular channels and their order in the conversion sequence must be selected in the ADC_SQRy registers. The total number of conversions in the regular group must be written in the LEN[3:0] bits in the ADC_SQR1 register.
- • An injected group is composed of up to four conversions. The injected channels and their order in the conversion sequence must be selected in the ADC_JSQR register. The total number of conversions in the injected group must be written in the JLEN[1:0] bits in the ADC_JSQR register.
ADC_SQRy registers must not be modified while a regular conversion is ongoing. ADC regular conversions must consequently be stopped by setting ADSTP (refer to Section 23.4.18: Stopping an ongoing conversion (ADSTP, JADSTP) ).
In addition, the ADC_JSQR register must not be modified while an injected conversion is ongoing. ADC injected conversions must consequently be stopped by setting JADSTP, except when JQDIS is cleared.
23.4.11 Channel preselection register (ADC_PCSEL)
The PCSEL bit of the ADC_PCSEL register controls the analog switch integrated in the I/O.
For each channel selected through SQRx or JSQRx bits, the corresponding PCSEL bit must be configured in advance in the ADC_PCSEL register. The ADC input multiplexer selects the ADC input according to SQRx and JSQRx configuration with very high speed. The analog switch integrated in the I/O cannot react as fast as the ADC multiplexer. To avoid the delay due to the analog switch control on the I/O, it is necessary to preselect the input channels that are selected through the SQRx and JSQRx. The selection is based on the \( V_{IN} \) of each ADC input. For example, if the ADC converts ADCx_IN1, PCSEL1 bit must also be set in ADC_PCSEL register.
Note: Configuring the PCSEL bit is not necessary for the internal channels (such as \( V_{REFINT} \) ).
23.4.12 Channel-wise programmable sampling time (SMPR1, SMPR2)
Before starting a conversion, the ADC must establish a direct connection between the voltage source under measurement and the embedded sampling capacitor of the ADC. This sampling time must be sufficient for the input voltage source to charge the embedded capacitor to the input voltage level.
Each channel can be sampled with a different sampling time, which is programmable through the SMP[2:0] bits of the ADC_SMPR1 and ADC_SMPR2 registers. It is therefore possible to select among the following sampling time values:
- • SMP = 000: 1.5 ADC clock cycles
- • SMP = 001: 2.5 ADC clock cycles
- • SMP = 010: 6.5 ADC clock cycles
- • SMP = 011: 11.5 ADC clock cycles
- • SMP = 100: 23.5 ADC clock cycles
- • SMP = 101: 46.5 ADC clock cycles
- • SMP = 110: 246.5 ADC clock cycles
- • SMP = 111: 1499.5 ADC clock cycles
The total conversion time is calculated as follows (12-bit mode):
Example
With \( F_{adc\_ker\_ck} = 30 \text{ MHz} \) and a sampling time of 2.5 ADC clock cycles:
The ADC notifies the end of the sampling phase by asserting the EOSMP flag (only for regular conversion).
Constraints on the sampling time
For each channel, SMP[2:0] bits must be programmed to respect a minimum and a maximum sampling times as specified in the ADC characteristics section of the datasheets.
Bulb sampling mode
The bulb sampling mode enables to obtain longer sampling time.
When the BULB bit is set in the ADC_CFGR2 register, the sampling period starts immediately after the last ADC conversion. A hardware or software trigger starts the conversion after the sampling time has been programmed in ADC_SMPRx registers. The very first ADC conversion after the ADC is enabled, is performed with the sampling time programmed in SMP bits. The bulb mode is effective starting from the second conversion.
The maximum sampling time is limited (refer to the ADC characteristics section of the datasheet).
Bulb mode is supported exclusively in regular conversion; dual mode is not supported.
The BULB bit can be modified only when the ADEN bit of the ADC_CR register is cleared.
When the BULB bit is set, it is not allowed to set the SMPTRIG bit in ADC_CFGR2.
Figure 172. Bulb mode timing diagram

The figure shows two timing diagrams for ADC operation. The top diagram, titled 'Normal (discontinuous) mode', shows the ADC state cycling through 'idle', 'sample', and 'conversion'. The bottom diagram, titled 'Bulb (discontinuous) mode', shows the ADC state cycling through 'idle', 'sample', 'conversion', and then entering a 'sample' state for a duration labeled 'Sampling time programmed in SMP bits' before the next 'conversion' begins. A trigger signal is shown for both modes, with a rising edge starting the sampling period and a falling edge starting the conversion.
Sampling time control trigger mode
When the SMPTRIG bit is set, the sampling time programmed through SMPx bits is not applicable. The sampling time is controlled by the trigger signal edge.
When a hardware trigger is selected (EXTEN[1:0] = 01), each rising edge of the trigger signal starts the sampling period. A falling edge ends the sampling period and starts the conversion.
Due to the synchronization mechanism, the minimum allowed pulse width is seven adck_ck periods.
When a software trigger is selected (EXTEN[1:0] = 00), the software trigger is not the ADSTART bit of ADC_CR but the SWTRIG bit. The SWTRIG bit has to be set to start the sampling period, and it has to be cleared to end the sampling period and start the conversion. In this mode, the minimum sampling time is limited to seven ADC clock cycles.
The maximum sampling time is limited (refer to the ADC characteristics section of the datasheet).
This mode is only compatible with the discontinuous mode. DISCNUM must be cleared for regular conversion mode. It is not supported for injected conversion mode and autoinjection mode.
When the SMPTRIG bit is set, setting the BULB bit is not allowed and only regular conversion is supported.
The sampling time control trigger mode is not compatible with the following dual modes:
DUAL[4:0] = 0b00010, 0b00011, 0b00101, 0b00110, 0b00111, and 0b01001.
23.4.13 Single conversion mode
To enable the single conversion mode for regular channels, clear both CONT and DISCEN bits in ADC_CFGR1 register. To enable it on injected channel, clear JDISCEN bit.
In single conversion mode, the ADC performs once all the regular conversions of the programmed channels. This mode is started by one of the following events:
- • ADSTART bit set in the ADC_CR register (for a regular channel)
- • JADSTART bit set in the ADC_CR register (for an injected channel)
- • An external hardware trigger event (for a regular or injected channel)
Inside the regular sequence, after each conversion is complete:
- • The converted data are stored into the 32-bit 8-level FIFO accessible through the ADC_DR register,
- • The EOC (end of regular conversion) flag is set, and
- • An interrupt is generated if the EOCIE bit is set.
Inside the injected sequence, after each conversion is complete:
- • The converted data are stored into one of the four 32-bit ADC_JDRy registers,
- • The JEOC (end of injected conversion) flag is set, and
- • An interrupt is generated if the JEOCIE bit is set.
After the regular sequence is complete:
- • The EOS (end of regular sequence) flag is set, and
- • An interrupt is generated if the EOSIE bit is set.
After the injected sequence is complete:
- • The JEOS (end of injected sequence) flag is set, and
- • An interrupt is generated if the JEOSIE bit is set.
The ADC then stops until a new external regular or injected trigger occurs or until the ADSTART or JADSTART bit is set again.
Note: To convert a single channel, program a sequence with a length of 1.
23.4.14 Continuous conversion mode (CONT = 1)
This mode applies to regular channels only.
In continuous conversion mode, when a software or hardware regular trigger event occurs, the ADC performs once all the regular conversions of the channels and then automatically restarts and continuously converts all the conversions of the sequence. This mode is started by setting the CONT bit of the ADC_CFGR1 register, either by an external trigger or by setting the ADSTART bit in the ADC_CR register.
Inside the regular sequence, after each conversion is complete:
- • The converted data are stored into the eight 32-bit word FIFO accessible through the ADC_DR register.
- • The EOC (end of conversion) flag is set, and
- • An interrupt is generated if the EOCIE bit is set.
After the sequence of conversions is complete:
- • The EOS (end of sequence) flag is set, and
- • An interrupt is generated if the EOSIE bit is set.
Then, a new sequence restarts immediately and the ADC continuously repeats the conversion sequence.
Note: To convert a single channel, program a sequence with a length of 1.
It is not possible to have both discontinuous mode and continuous mode enabled, this means that it is forbidden to set both DISCEN and CONT bits.
Injected channels cannot be converted continuously. The only exception is when an injected channel is configured to be converted automatically after regular channels in continuous mode (using JAUTO bit) (refer to Section : Autoinjection mode ).
23.4.15 Discontinuous mode (DISCEN, DISCNUM, JDISCEN)
Regular group mode
This mode is enabled by setting the DISCEN and CONT = 0 bit in the ADC_CFGR1 register.
It is used to convert a short sequence (subgroup) of n conversions ( \( n \leq 8 \) ) that is part of the sequence of conversions selected in the ADC_SQRy registers. The value of n is specified by writing to the DISCNUM[2:0] bits in the ADC_CFGR1 register.
When an external trigger occurs, it starts the next n conversions selected in the ADC_SQRy registers until all the conversions in the sequence are done. The total sequence length is defined by the LEN[3:0] bits in the ADC_SQR1 register.
Example:
- • DISCEN = 1, n = 3, channels to be converted = 1, 2, 3, 6, 7, 8, 9, 10, 11
- – First trigger: channels converted are 1, 2, 3 (an EOC event is generated at the end of each conversion).
- – Second trigger: channels converted are 6, 7, 8 (an EOC event is generated at the end of each conversion).
- – Third trigger: channels converted are 9, 10, 11 (an EOC event is generated at the end of each conversion) and an EOS event is generated after the conversion of channel 11.
- – Fourth trigger: channels converted are 1, 2, 3 (an EOC event is generated at the end of each conversion).
- – ...
- • DISCEN = 0, channels to be converted = 1, 2, 3, 6, 7, 8, 9, 10, 11
- – First trigger: the complete sequence is converted: channel 1, then 2, 3, 6, 7, 8, 9, 10 and 11. Each conversion generates an EOC event and the last one also generates an EOS event.
- – All the next trigger events relaunch the complete sequence.
Note: The channel numbers referred to in the above example might not be available on all devices.
When a regular group is converted in discontinuous mode, no rollover occurs (the last subgroup of the sequence can have less than n conversions).
When all subgroups are converted, the next trigger starts the conversion of the first subgroup. In the example above, the fourth trigger reconverts the channels 1, 2 and 3 in the first subgroup.
It is not possible to have both discontinuous mode and continuous mode enabled. In this case (if DISCEN = 1, CONT = 1), the ADC behaves as if continuous mode was disabled.
Injected group mode
This mode is enabled by setting the JDISCEN bit in the ADC_CFGR1 register. It converts the sequence selected in the ADC_JSQR register, channel by channel, after an external injected trigger event. This is equivalent to discontinuous mode for regular channels with DISCNUM = 0.
When an external trigger occurs, it starts the next channel conversions selected in the ADC_JSQR registers until all the conversions in the sequence are done. The total sequence length is defined by the JLEN[1:0] bits in the ADC_JSQR register.
Example:
- • JDISCEN = 1, channels to be converted = 1, 2, 3
- – First trigger: channel 1 converted (a JEOC event is generated)
- – Second trigger: channel 2 converted (a JEOC event is generated)
- – Third trigger: channel 3 converted and a JEOC event + a JEOS event are generated
- – ...
Note: The channel numbers referred to in the above example might not be available on all devices.
When all injected channels have been converted, the next trigger starts the conversion of the first injected channel. In the example above, the fourth trigger reconverts the first injected channel 1.
It is not possible to use both autoinjection mode and discontinuous mode simultaneously: the bits DISCEN and JDISCEN must be kept cleared by software when JAUTO is set.
23.4.16 Starting conversions (ADSTART, JADSTART)
ADC regular conversions can be started by setting ADSTART.
When ADSTART is set, the conversion starts:
- • Immediately if EXTEN[1:0] = 00 (software trigger), or
- • At the next active edge of the selected regular hardware trigger, if EXTEN[1:0] is not equal to 00.
The application software starts ADC injected conversions by setting JADSTART.
When JADSTART is set, the conversion starts:
- • Immediately if JEXTEN[1:0] = 00 (software trigger), or
- • At the next active edge of the selected injected hardware trigger, if JEXTEN[1:0] is not equal to 00.
Note: In autoinjection mode (JAUTO = 1), use the ADSTART bit to start regular conversions followed by autoinjected conversions (JADSTART must be kept cleared).
When the hardware trigger is enabled, ADSTART and JADSTART also indicate whether an ADC operation is ongoing. The ADC can be reconfigured while ADSTART and JADSTART are both cleared, indicating that the ADC is idle.
In the case of software triggering, ADSTP and/or JADSTP must be set before ADC reconfiguration.
ADSTART is deasserted by hardware:
- • In single mode with software regular trigger (CONT = 0, EXTEN = 0x0): at any end of regular conversion sequence (EOS assertion)
- • In discontinuous mode (CONT = 0, DISCEN = 1, DISCNUM= x): at any of subgroup sequence
- • In all cases (CONT and EXTEN don't care), after execution of the ADSTP procedure asserted by the software
Note: In continuous mode (CONT = 1), ADSTART is not deasserted by hardware when EOS is asserted because the sequence is automatically relaunched.
When a hardware trigger is selected in single mode (CONT = 0 and EXTEN ≠ 0x00), ADSTART is not deasserted by hardware when EOS is asserted to help the software that does not need to reset ADSTART again for the next hardware trigger event. This ensures that no further hardware triggers are missed.
JADSTART is deasserted by hardware:
- • In single mode with software injected trigger (JEXTEN = 0x0): at the end of each injected conversion sequence (JEOS assertion)
- • In discontinuous mode (JDISCEN = 1): at the end of any conversion
- • In all cases (JEXTEN=x), after execution of the JADSTP procedure asserted by the software
Note: When the software trigger is selected, the ADSTART bit must not be set if the EOC flag is still high.
In bulb mode (BULB = 1), the previous end-of-conversion automatically starts the sampling, then setting ADSTART starts the conversion including the programmed sampling time.
In sampling time control trigger mode (SMPTRIG = 1), SWTRIG bit must be set to start the conversion.
23.4.17 Timing
The elapsed time between the start of a conversion and the end of a conversion is the sum of the configured sampling time plus the successive approximation time depending on data resolution:
Figure 173. Analog-to-digital conversion time

The diagram shows the timing of an ADC conversion across several signals:
- ADC state: Starts in RDY state, then enters Sampling Ch(N) , followed by Converting Ch(N) , and finally Sampling Ch(N+1) .
- Analog channel: Shows the input signal for Ch(N) and Ch(N+1) . The sampling phase is indicated by a hatched area.
- Internal S/H: Shows the internal Sample and Hold capacitor action: Sample AIN(N) (1) , Hold AIN(N) (1) , and Sample AIN(N+1) (1) .
- ADSTART: Set by software (SW) to start the conversion. It is cleared by software (SW) after the conversion of Ch(N) is complete.
- EOSMP: End of Sampling. Set by hardware (HW) at the start of conversion and cleared by software (SW).
- EOC: End of Conversion. Set by hardware (HW) at the end of conversion for Ch(N) and cleared by hardware/software (HW/SW).
- ADC_DR: Data register. It contains Data N-1 during the conversion of Ch(N) and updates to Data N after the conversion is complete.
Timing parameters are defined as:
- \( t_{\text{SMP}}^{(2)} \) : Sampling time.
- \( t_{\text{SAR}}^{(3)} \) : Successive approximation time.
Indicative timings
MSV30532V3
- 1. AIN represents the input voltage captured by the internal Sample and Hold (S/H) capacitor.
- 2. \( t_{\text{SMP}} \) depends on SMP[2:0].
- 3. \( t_{\text{SAR}} \) depends on RES[2:0].
Note: The bulb and the sampling time control trigger modes are not described in Figure 173: Analog-to-digital conversion time .
23.4.18 Stopping an ongoing conversion (ADSTP, JADSTP)
The software can decide to stop ongoing regular conversions by setting ADSTP and ongoing injected conversions by setting JADSTP.
Stopping conversions resets the ongoing ADC operation. The ADC can then be reconfigured (for example by changing the channel selection or the trigger). It is then ready for a new operation.
Injected conversions can be stopped while regular conversions are still ongoing and vice versa. This allows, for instance, the reconfiguration of the injected conversion sequence and triggers while regular conversions are still ongoing (and vice versa).
When the ADSTP bit is set by software, any ongoing regular conversion is aborted with the partial result discarded (the ADC_DR register is not updated with the current conversion).
When the JADSTP bit is set by software, any ongoing injected conversion is aborted with partial result discarded (the ADC_JDRy register is not updated with the current conversion). The scan sequence is also aborted and reset (meaning that relaunching the ADC restarts a new sequence).
Once this procedure is complete, ADSTP/ADSTART bits (for regular conversion), or JADSTP/JADSTART bits (for injected conversion) are deasserted by hardware and the software must poll ADSTART (or JADSTART) until the bit is reset before assuming the ADC is completely stopped.
Note: In autoinjection mode (JAUTO = 1), setting the ADSTP bit aborts both regular and injected conversions (JADSTP must not be used).
Figure 174. Stopping ongoing regular conversions

Timing diagram for stopping ongoing regular conversions. The diagram shows the ADC state (RDY, Sample Ch(N-1), Convert Ch(N-1), RDY, Sample Ch(N), C, RDY) triggered by a 'Trigger'. The ADSTART bit is set by software (SW) to start 'REGULAR CONVERSIONS ongoing'. The ADSTP bit is set by software (SW) to stop them, and it is cleared by hardware (HW). The ADC_DR register shows Data N-2 and Data N-1. A note indicates that software is not allowed to configure regular conversions selection and triggers.
Figure 175. Stopping ongoing regular and injected conversions

Timing diagram for stopping ongoing regular and injected conversions. The diagram shows the ADC state (RDY, Sample Ch(N-1), Convert Ch(N-1), RDY, Sample Ch(M), C, RDY, Sample, RDY) triggered by 'Regular trigger', 'Injected trigger', and 'Regular trigger'. The JADSTART bit is set by software (SW) to start 'INJECTED CONVERSIONS ongoing' and is cleared by hardware (HW). The JADSTP bit is set by software (SW) to stop them and is cleared by hardware (HW). The ADSTART bit is set by software (SW) to start 'REGULAR CONVERSIONS ongoing' and is cleared by hardware (HW). The ADSTP bit is set by software (SW) to stop them and is cleared by hardware (HW). The ADC_JDR register shows DATA M-1, and the ADC_DR register shows DATA N-2 and DATA N-1. Notes indicate that software is not allowed to configure injected or regular conversions selection and triggers.
23.4.19 Conversion on external trigger and trigger polarity (EXTSEL, EXTEN, JEXTSEL, JEXTEN)
A conversion or a sequence of conversions can be triggered either by software or by an external event (for example timer capture, input pins). If the EXTEN[1:0] control bits (for a regular conversion) or JEXTEN[1:0] bits (for an injected conversion) are different from 0b00, then external events are able to trigger a conversion with the selected polarity.
The regular trigger selection is effective once the software has set ADSTART while the injected trigger selection is effective once the software has set JADSTART bit.
All hardware triggers that occur while a conversion is ongoing are ignored:
- • If ADSTART = 0, regular hardware triggers are ignored.
- • If JADSTART = 0, injected hardware triggers are ignored.
Table 207 provides the correspondence between the EXTEN[1:0] and JEXTEN[1:0] values and the trigger polarity.
Table 207. Configuring the trigger polarity for regular external triggers
| EXTEN[1:0] | Source |
|---|---|
| 00 | Hardware trigger detection disabled, software trigger detection enabled |
| 01 | Hardware trigger with detection on the rising edge (sampling time controlled in SMPTRIG mode) |
| 10 | Hardware trigger with detection on the falling edge |
| 11 | Hardware trigger with detection on both the rising and falling edges |
Note: The polarity of the regular trigger cannot be changed on-the-fly.
Table 208. Configuring the trigger polarity for injected external triggers
| JEXTEN[1:0] | Source |
|---|---|
| 00 | Hardware Trigger detection disabled, software trigger detection enabled |
| 01 | Hardware Trigger with detection on the rising edge |
| 10 | Hardware Trigger with detection on the falling edge |
| 11 | Hardware Trigger with detection on both the rising and falling edges |
The EXTSEL and JEXTSEL control bits select which, out of 32 possible events, can trigger the conversion of the regular and injected groups.
A regular group conversion can be interrupted by an injected trigger.
Figure 176. Triggers shared between ADC master and slave
![Figure 176: Triggers shared between ADC master and slave. The diagram shows two ADC blocks, 'ADC MASTER' and 'ADC SLAVE', sharing external trigger signals. On the left, 'Regular sequencer triggers' include adc_ext_trg0, adc_ext_trg1, ..., adc_ext_trg31. 'Injected sequencer triggers' include adc_jext_trg0, adc_jext_trg1, ..., adc_jext_trg31. These signals are connected to multiplexers within the ADC blocks. The 'ADC MASTER' has 'External regular trigger' and 'External injected trigger' outputs, controlled by 'EXTSEL[3:0]' and 'JEXTSEL[4:0]' respectively. The 'ADC SLAVE' has similar 'External regular trigger' and 'External injected trigger' outputs, also controlled by 'EXTSEL[3:0]' and 'JEXTSEL[4:0]'. The diagram illustrates that the same external trigger signals can be used by both the master and slave ADCs.](/RM0487-STM32U3/d7c046caff249c338369403bb7f825ce_img.jpg)
Refer to ADC interconnection tables in Section 23.4.2: ADC pins and internal signals for the list of the external triggers.
23.4.20 Injected channel management
Triggered injection mode
To use triggered injection, the JAUTO bit in the ADC_CFGR1 register must be cleared.
- 1. Start the conversion of a group of regular channels either by an external trigger or by setting the ADSTART bit in the ADC_CR register.
- 2. If an external injected trigger occurs, or if the JADSTART bit in the ADC_CR register is set during the conversion of a regular group of channels, the current conversion is reset and the injected channel sequence switches are launched (all the injected channels are converted once if JDISCEN = 0).
- 3. Then, the regular conversion of the regular group of channels is resumed from the last interrupted regular conversion.
- 4. If a regular event occurs during an injected conversion, the injected conversion is not interrupted but the regular sequence is executed at the end of the injected sequence. Figure 177 shows the corresponding timing diagram.
Note: When using triggered injection, one must ensure that the interval between trigger events is longer than the injection sequence.
Figure 177. Injected conversion latency during ongoing regular conversion

The figure is a timing diagram with four horizontal signal lines. The top line, labeled 'adc_ker_ck', shows a periodic square wave representing the ADC clock. The second line, labeled 'Injection event', shows a single positive pulse. The third line, labeled 'Reset ADC', shows a signal that is initially high and then drops to low. The bottom line, labeled 'Start of sampling', shows a signal that is initially low and then drops to low. Vertical dashed lines indicate key timing points: the first dashed line is at the rising edge of the clock pulse that occurs just before the injection event; the second dashed line is at the falling edge of the injection event pulse; the third dashed line is at the falling edge of the Reset ADC signal. A horizontal double-headed arrow between the first and third dashed lines is labeled 'max. latency(1)'. The signal 'Start of sampling' is shown as a step function that drops to low at the third dashed line. The text 'MSv69546V2' is located in the bottom right corner of the diagram area.
1. The maximum latency value can be found in the electrical characteristics of the device datasheet.
Autoinjection mode
If the JAUTO bit in the ADC_CFGR1 register is set, then the channels in the injected group are automatically converted after the regular group of channels. This can be used to convert a sequence of up to 20 conversions programmed in the ADC_SQRy and ADC_JSQR registers.
In this mode, the ADSTART bit in the ADC_CR register must be set to start regular conversions, followed by injected conversions (JADSTART must be kept cleared). Setting the ADSTP bit aborts both regular and injected conversions (JADSTP bit must not be used).
In this mode, external trigger on injected channels must be disabled.
Note: Autoinjection mode is compatible with discontinuous mode.
23.4.21 Queue of context for injected conversions
A queue of context is implemented to anticipate up to two contexts for the next injected sequence of conversions. JQDIS bit of the ADC_CFGR1 register must be reset to enable this feature. Only hardware-triggered conversions are possible when the context queue is enabled. The queue of context is not supported in dual modes or in auto delay mode.
This context consists of:
- • Configuration of the injected triggers (bits JEXTEN[1:0] and JEXTSEL bits in the ADC_JSQR register)
- • Definition of the injected sequence (bits JSQx[4:0] and JLEN[1:0] in the ADC_JSQR register)
All the parameters of the context are defined in a single register ADC_JSQR and this register implements a queue of two buffers, allowing the bufferization of up to two sets of parameters:
- • The ADC_JSQR register can be written at any moment even when injected conversions are ongoing.
- • Each data written to the ADC_JSQR register is stored into the queue of context.
- • At the beginning, the queue is empty and the first write access to the ADC_JSQR register defines the first context and the ADC is ready to receive injected triggers if JADSTART = 1.
- • Once an injected sequence is complete, the queue is consumed and the context changes according to the next ADC_JSQR parameters stored in the queue. This new context is applied for the next injected sequence of conversions.
- • A queue overflow occurs when writing to the ADC_JSQR register while the queue is full. This overflow is signaled by the assertion of the flag JQOVF. When an overflow occurs, the write access of ADC_JSQR register which has created the overflow is ignored and the queue of context is unchanged. An interrupt can be generated if bit JQOVFIE is set.
- • Two behaviors are possible when the queue becomes empty, depending on the value of the JQM control bit of the ADC_CFGR1 register:
- – If JQM = 0, the queue is empty just after enabling the ADC, but then it can never be empty during run operations: the queue always maintains the last active.
- – If JQM = 1, the queue becomes empty when end of injected sequence of last context occurs or if the queue is flushed by JADSTP = 1. When this occurs, there is no more context in the queue and software needs to write new injected context in the ADC_JSQR register.
- • Reading the ADC_JSQR register returns the current the ADC_JSQR context which is active at that moment. If JQM = 0, when the ADC_JSQR context is empty, the JSQi is read as 0x00.
- • The queue is flushed when stopping injected conversions by setting JADSTP or when disabling the ADC by setting ADDIS:
- – If JQM = 0, the queue is flushed, but the last active context is maintained (ADC_JSQR register kept last value).
- – If JQM = 1, the queue becomes empty.
Note: When discontinuous mode (bit JDISCEN = 1) is configured, only JEOS, which marks the end of injected sequence, triggers the transfer of the queue to the active context (JSQR register). See example below (length = 3 for both contexts):
- • First trigger, discontinuous. Sequence 1: context 1, first conversion carried out.
- • Second trigger, discontinuous. Sequence 1: context 1, second conversion carried out.
- • Third trigger, discontinuous. Sequence 1: context 1, third conversion carried out. Then context change occurs to context 2.
- • Fourth trigger, discontinuous. Sequence 2: context 2, first conversion carried out.
- • Fifth trigger, discontinuous. Sequence 2: context 2, second conversion carried out.
- • Sixth trigger, discontinuous. Sequence 2: context 2, third conversion carried out. Then context change occurs to next context.
Behavior when changing the trigger or sequence context
Figure 178 and Figure 179 show the behavior of the context queue when changing the sequence or the triggers.
Figure 178. Example of ADC_JSQR queue of context (sequence change)

Timing diagram for Figure 178. The diagram shows the following signals and states over time:
- Write ADC_JSQR: Shows three pulses labeled P1, P2, and P3. P1 and P2 are close together, while P3 is later.
- JSQR queue: Starts as EMPTY . After P1, it contains P1 . After P2, it contains P1,P2 . After P3, it contains P2 , then P2,P3 , and finally P3 .
- ADC J context (returned by reading ADC_JSQR): Starts as EMPTY . After P1, it contains P1 . After P2, it contains P2 . After P3, it contains P3 .
- ADC state: Starts as RDY . After P1 and P2, it shows Conversion1 , Conversion2 , and Conversion3 , then returns to RDY . After P3, it shows Conversion1 and returns to RDY .
MS30536V4
- Parameters:
P1: sequence of 3 conversions, hardware trigger 1
P2: sequence of 1 conversion, hardware trigger 1
P3: sequence of 4 conversions, hardware trigger 1
Figure 179. Example of ADC_JSQR queue of context (trigger change)

Timing diagram for Figure 179. The diagram shows the following signals and states over time:
- Write ADC_JSQR: Shows three pulses labeled P1, P2, and P3. P1 and P2 are close together, while P3 is later.
- ADC_JSQR queue: Starts as EMPTY . After P1, it contains P1 . After P2, it contains P1,P2 . After P3, it contains P2 , then P2,P3 (with P3 ignored), and finally P3 .
- Trigger 1: Shows a pulse after P2.
- Trigger 2: Shows a pulse after P1, labeled Ignored .
- ADC J context (returned by reading ADC_JSQR): Starts as EMPTY . After P1, it contains P1 . After P2, it contains P2 . After P3, it contains P3 .
- ADC state: Starts as RDY . After P1 and P2, it shows Conversion1 and Conversion2 , then returns to RDY . After P3, it shows Conversion1 and returns to RDY .
MS30537V4
- Parameters:
P1: sequence of 2 conversions, hardware trigger 1
P2: sequence of 1 conversion, hardware trigger 2
P3: sequence of 4 conversions, hardware trigger 1
Queue of context: Behavior when a queue overflow occurs
The Figure 180 and Figure 181 show the behavior of the context queue if an overflow occurs before or during a conversion.
Figure 180. Example of ADC_JSQR queue of context with overflow before conversion

The diagram illustrates the state of the ADC context queue and related signals.
1.
Write ADC_JSQR
: Shows pulses for parameters P1, P2, P3, and P4.
2.
ADC_JSQR queue
: Starts EMPTY. After P1 is written, it contains P1. After P2, it contains P1, P2. When P3 is written, an overflow occurs (P3 is ignored) because the queue is full with P1 and P2. Later, after P4 is written, it contains P2, P4.
3.
JQOVF
: Flag set when P3 is written (overflow) and cleared by software (SW).
4.
Trigger 1
and
Trigger 2
: Hardware triggers for the conversion sequences.
5.
ADC J context (returned by reading ADC_JSQR)
: Shows the context read from the queue. It contains P1 after the first conversion, and P2 after the second.
6.
ADC state
: Transitions from RDY to Conversion1, then Conversion2, then back to RDY, and finally to Conversion1 again.
7.
JEOS
: End of conversion signal.
Reference: MS30538V4
- 1. Parameters:
P1: sequence of 2 conversions, hardware trigger 1
P2: sequence of 1 conversion, hardware trigger 2
P3: sequence of 3 conversions, hardware trigger 1
P4: sequence of 4 conversions, hardware trigger 1
Figure 181. Example of ADC_JSQR queue of context with overflow during conversion

This diagram is similar to Figure 180 but with a key difference in the timing of the overflow.
1.
Write ADC_JSQR
: Pulses for P1, P2, P3, and P4.
2.
ADC_JSQR queue
: Similar to Figure 180, but the overflow (P3 ignored) occurs while the ADC is still in Conversion1.
3.
JQOVF
: Flag set during Conversion1 and cleared by SW.
4.
ADC state
: Transitions from RDY to Conversion1. While in Conversion1, the overflow occurs. After Conversion1, it goes to Conversion2, then RDY, and then Conversion1 again.
Reference: MS30539V4
- 1. Parameters:
P1: sequence of 2 conversions, hardware trigger 1
P2: sequence of 1 conversion, hardware trigger 2
P3: sequence of 3 conversions, hardware trigger 1
P4: sequence of 4 conversions, hardware trigger 1
It is recommended to manage the queue overflows as described below:
- • After each P context write to the ADC_JSQR register, the JQOVF flag shows if the write has been ignored or not (an interrupt can be generated).
- • Avoid queue overflows by writing the third context (P3) only once the flag JEOS of P1 is generated, then the previous context P2 has been set. This ensures that the previous context has been consumed and that the queue is not full.
Queue of context: Behavior when the queue becomes empty
Figure 182 and Figure 183 show the behavior of the context queue when the queue becomes empty in both cases JQM = 0 or 1.
Figure 182. Example of ADC_JSQR queue of context with empty queue (case JQM = 0)

The diagram shows the following signals and states over time:
- Write ADC_JSQR: Shows the sequence of writes for contexts P1, P2, and P3.
- ADC_JSQR queue: Shows the queue state. It starts as EMPTY, then contains P1, then P1 and P2. When P3 is written, the queue contains P2 and P3. Annotations indicate that the queue is not empty and maintains P2 because JQM=0, and that the queue is not empty because P3 is maintained.
- Trigger 1: Shows a series of hardware trigger pulses.
- ADC J context (returned by reading ADC_JSQR): Shows the context currently being processed. It starts as EMPTY, then P1, then P2. When P3 is written and a trigger occurs, the context remains P2 until the JEOS flag is generated, at which point it switches to P3.
- ADC state: Shows the state of the ADC. It starts as RDY, then Conversion1, then RDY, then Conversion1, then RDY, then Conversion1, then RDY, then Conversion1, then RDY, then Conv.
MS30540V5
- 1. Parameters:
P1: sequence of 1 conversion, hardware trigger 1
P2: sequence of 1 conversion, hardware trigger 1
P3: sequence of 1 conversion, hardware trigger 1
Note: When writing P3, the context changes immediately as the context of P2 is already converted (JEOS is generated). However, because of internal resynchronization, there is a latency and if a trigger occurs just after or before writing P3, it can happen that the conversion is launched considering the context P2. To avoid this situation, the user must ensure that there is no ADC trigger happening when writing a new context that applies immediately. It is recommended to program the new context before the JEOS timing, otherwise the previous context is used.
Figure 183. Example of ADC_JSQR queue of context with empty queue (JQM = 1)

The diagram illustrates the behavior of the ADC_JSQR queue when JQM=1. The 'Write ADC_JSQR' signal shows three pulses for sequences P1, P2, and P3. The 'ADC_JSQR queue' starts as 'EMPTY', becomes 'P1', then 'P1,P2', then 'P2', then 'EMPTY', then 'P3', and finally 'EMPTY'. The 'Trigger 1' signal is shown as a series of pulses. The 'ADC J context (returned by reading ADC_JSQR)' shows 'EMPTY', 'P1', 'P2', 'EMPTY (0x00)', 'P3', and 'EMPTY'. The 'ADC state' shows 'RDY', 'Conversion1', 'RDY', 'Conversion1', 'RDY', 'Conversion1', and 'RDY'. Annotations indicate that when the queue becomes empty, triggers are ignored because JQM=1. A note at the bottom right indicates MS30541V3.
- 1. Parameters:
P1: sequence of 1 conversion, hardware trigger 1
P2: sequence of 1 conversion, hardware trigger 1
P3: sequence of 1 conversion, hardware trigger 1
Flushing the queue of context
The figures below show the behavior of the context queue in various situations when the queue is flushed.
Figure 184. Flushing ADC_JSQR queue of context by setting JADSTP = 1 (JQM = 0) - JADSTP occurs during an ongoing conversion.

The diagram illustrates the behavior of the ADC_JSQR queue when JADSTP=1 (JQM=0) during an ongoing conversion. The 'Write ADC_JSQR' signal shows three pulses for sequences P1, P2, and P3. The 'ADC_JSQR queue' starts as 'EMPTY', becomes 'P1', then 'P1, P2', then 'P1', then 'P3'. The 'JADSTP' signal is set by software (S/W) and reset by hardware (H/W). The 'JADSTART' signal is reset by hardware (H/W) and set by software (S/W). The 'Trigger 1' signal is shown as a series of pulses. The 'ADC J context (returned by reading ADC_JSQR)' shows 'EMPTY', 'P1', and 'P3'. The 'ADC state' shows 'RDY', 'Conv1 (Aborted)', 'STP', 'RDY', 'Conversion1', and 'RDY'. An annotation indicates that the queue is flushed and maintains the last active context (P2 is lost). A note at the bottom right indicates MS30542V2.
- 1. Parameters:
P1: sequence of 1 conversion, hardware trigger 1
P2: sequence of 1 conversion, hardware trigger 1
P3: sequence of 1 conversion, hardware trigger 1
Figure 185. Flushing ADC_JSQR queue of context by setting JADSTP = 1 (JQM = 0) - JADSTP occurs during an ongoing conversion and a new trigger occurs

The diagram illustrates the following sequence of events:
- Write ADC_JSQR: Initial write sets P1. Subsequent writes add P2 and then P3.
- ADC_JSQR queue: Starts as EMPTY. It contains P1, then P1 and P2. When JADSTP is set and a new trigger occurs, the queue is flushed to contain only P1 (P2 is lost). Later, it contains P1 and P3, and finally only P3.
- JADSTP: Set by software (S/W) during the first conversion. Reset by hardware (H/W) after the conversion. Set by S/W again later.
- JADSTART: Reset by H/W. Set by S/W to start the second conversion.
- Trigger 1: Hardware trigger events.
- ADC J context (returned by reading ADC_JSQR): Starts as EMPTY. It returns P1. When the queue is flushed, it returns P3.
- ADC state: Starts as RDY. Becomes Conv1 (Aborted) when JADSTP is set. Returns to RDY. Becomes Conversion1 when JADSTART is set. Returns to RDY. Becomes Conversion1 again when a new trigger occurs while JADSTP is set. Returns to RDY.
MS30543V2
- 1. Parameters:
P1: sequence of 1 conversion, hardware trigger 1
P2: sequence of 1 conversion, hardware trigger 1
P3: sequence of 1 conversion, hardware trigger 1
Figure 186. Flushing ADC_JSQR queue of context by setting JADSTP = 1 (JQM = 0) - JADSTP occurs outside an ongoing conversion

The diagram illustrates the following sequence of events:
- Write ADC_JSQR: Initial write sets P1. Subsequent writes add P2 and then P3.
- ADC_JSQR queue: Starts as EMPTY. It contains P1, then P1 and P2. When JADSTP is set (while the ADC is RDY), the queue is flushed to contain only P1 (P2 is lost). Later, it contains P3.
- JADSTP: Set by software (S/W) while the ADC is in the READY state. Reset by hardware (H/W).
- JADSTART: Reset by H/W. Set by S/W to start a conversion.
- Trigger 1: Hardware trigger events.
- ADC J context (returned by reading ADC_JSQR): Starts as EMPTY. It returns P1. When the queue is flushed, it returns P3.
- ADC state: Starts as RDY. Becomes STP when JADSTP is set. Returns to RDY. Becomes Conversion1 when JADSTART is set. Returns to RDY.
MS30544V3
- 1. Parameters:
P1: sequence of 1 conversion, hardware trigger 1
P2: sequence of 1 conversion, hardware trigger 1
P3: sequence of 1 conversion, hardware trigger 1
Figure 187. Flushing ADC_JSQR queue of context by setting JADSTP = 1 (JQM = 1)

The diagram illustrates the behavior of the ADC when JADSTP = 1 (JQM = 1). The sequence of events is as follows:
- Write ADC_JSQR: Contexts P1 and P2 are written to the queue. Later, P3 is written after P2 is lost.
- ADC_JSQR queue: Starts as EMPTY. After writing P1, it contains P1. After writing P2, it contains P1, P2. When JADSTP is set by software (S/W), the queue is reset by hardware (H/W) and becomes EMPTY (P2 is lost). After writing P3, it contains P3. Finally, it becomes EMPTY again.
- JADSTP: Set by S/W, then Reset by H/W when the queue becomes empty.
- JADSTART: Reset by H/W, then Set by S/W to start conversion.
- Trigger 1: Hardware trigger that starts conversion. When JADSTP = 1, subsequent triggers are ignored.
- ADC J context (returned by reading ADC_JSQR): Starts as EMPTY. Returns P1. When the queue is flushed, it returns EMPTY (0x00). Returns P3. Finally, it becomes EMPTY.
- ADC state: Starts as RDY. Becomes Conv1 (Aborted) when JADSTART is set while the queue is being flushed. Returns to RDY. Becomes Conversion1 when Trigger 1 is ignored. Returns to RDY.
MS30545V2
- 1. Parameters:
P1: sequence of 1 conversion, hardware trigger 1
P2: sequence of 1 conversion, hardware trigger 1
P3: sequence of 1 conversion, hardware trigger 1
Figure 188. Flushing ADC_JSQR queue of context by setting ADDIS = 1 (JQM = 0)

The diagram illustrates the behavior of the ADC when ADDIS = 1 (JQM = 0). The sequence of events is as follows:
- ADC_JSQR queue: Contains P1, P2. When ADDIS is set by software (S/W), the queue is flushed and maintains the last active context (P2, which was not consumed). It then contains P1.
- ADDIS: Set by S/W, then Reset by H/W.
- ADC J context (returned by reading ADC_JSQR): Returns P1.
- ADC state: Starts as RDY. Becomes REQ-OFF when ADDIS is set. Returns to OFF when ADDIS is reset.
MS30545V2
- 1. Parameters:
P1: sequence of 1 conversion, hardware trigger 1
P2: sequence of 1 conversion, hardware trigger 1
P3: sequence of 1 conversion, hardware trigger 1
Figure 189. Flushing ADC_JSQR queue of context by setting ADDIS = 1 (JQM = 1)

Queue is flushed and becomes empty
(ADC_JSQR is read as 0x00)
ADC_JSQR queue: P1, P2 → EMPTY
ADDIS: Set by S/W → Reset by H/W
ADC J context (returned by reading ADC_JSQR): P1 → EMPTY (0x00)
ADC state: RDY → REQ-OFF → OFF
MS30547V4
- 1. Parameters:
P1: sequence of 1 conversion, hardware trigger 1
P2: sequence of 1 conversion, hardware trigger 1
P3: sequence of 1 conversion, hardware trigger 1
Queue of context: Clear the context
- • Setting JQDIS to 0 and then to 1 clears the context.
- • Setting JADSTP to 0, writing a new context, and then setting JADSTART to 1 clears the previous context.
Disabling the queue
It is possible to disable the queue by setting the JQDIS bit of the ADC_CFGR1 register.
To clear the context queue, write 0 to JQDIS first, then write 1.
23.4.22 Programmable resolution (RES) - fast conversion mode
Faster conversions can be performed by reducing the ADC resolution.
The resolution can be configured to be either 12, 10, 8, or 6 bits by programming the RES[1:0] control bits. Figure 194 , Figure 195 , Figure 196 and Figure 197 show the conversion result format with respect to the resolution as well as to the data alignment.
Lower resolution allows faster conversion time for applications where high-data precision is not required. It reduces the conversion time spent by the successive approximation steps according to .
Table 209. \( T_{SAR} \) timings depending on resolution| RES (bits) | \( T_{SAR} \) (ADC clock cycles) | \( T_{SAR} \) (ns) at \( F_{adc\_ker\_ck} = 30 \) MHz | \( T_{CONV} \) (ADC clock cycles) (with Sampling time= 2.5 ADC clock cycles) | \( T_{CONV} \) (ns) at \( F_{adc\_ker\_ck} = 30 \) MHz |
|---|---|---|---|---|
| 12 | 12.5 ADC clock cycles | 416.667 ns | 15 ADC clock cycles | 500.0 ns |
| 10 | 10.5 ADC clock cycles | 350 ns | 13 ADC clock cycles | 433.33 ns |
| 8 | 8.5 ADC clock cycles | 283.33 ns | 11 ADC clock cycles | 366.67 ns |
| 6 | 6.5 ADC clock cycles | 216.67 ns | 9 ADC clock cycles | 300 ns |
23.4.23 End of conversion and end of sampling phase (EOC, JEOC, EOSMP)
The ADC notifies the application at the end of each regular conversion (EOC) event and injected conversion (JEOC) event.
The ADC sets the EOC flag as soon as a new regular conversion data is available in the ADC_DR register. An interrupt can be generated if the EOCIE bit is set. The software can clear the EOC flag either by programming it to 1 or by reading ADC_DR. If ADC_DR FIFO is not emptied, the EOC flag is set again and an interrupt can be generated again.
The ADC sets the JEOC flag as soon as new injected conversion data is available in one of the ADC_JDRy registers. An interrupt can be generated if the JEOCIE bit is set. The software can clear the JEOC flag either by programming it to 1 or by reading the corresponding ADC_JDRy register.
The ADC also notifies the end of the sampling phase by setting the EOSMP flag (for regular conversions only). The EOSMP flag is cleared by software by programming it to 1. An interrupt can be generated if the EOSMPIE bit is set.
23.4.24 End of conversion sequence (EOS, JEOS)
The ADC notifies the application at the end of each regular sequence (EOS) and injected sequence (JEOS) event.
The ADC sets the EOS flag as soon as the conversion of the last data of the regular sequence is complete. An interrupt can be generated if the EOSIE bit is set. The EOS flag is cleared by the software by programming it to 1.
The ADC sets the JEOS flag as soon as the conversion of the last data of the injected sequence is complete. An interrupt can be generated if the JEOSIE bit is set. The JEOS flag is cleared by the software by programming it to 1.
23.4.25 Timing diagram examples (single/continuous modes, hardware/software triggers)
Figure 190. Single conversions of a sequence, software trigger

MSV30549V2
- 1. EXTEN[1:0] = 00, CONT = 0
- 2. Channels selected = 1, 9, 10, 17; AUTDLY = 0.
Figure 191. Continuous conversion of a sequence, software trigger

MSV30550V2
- 1. EXTEN[1:0] = 00, CONT = 1
- 2. Channels selected = 1, 9, 10, 17; AUTDLY = 0.
Figure 192. Single conversions of a sequence, hardware trigger

- 1. TRGx (overfrequency) is selected as trigger source, EXTEN[1:0] = 01, CONT = 0
- 2. Channels selected = 1, 2, 3, 4; AUTDLY = 0.
Figure 193. Continuous conversions of a sequence, hardware trigger

- 1. TRGx is selected as trigger source, EXTEN[1:0] = 10, CONT = 1.
- 2. Channels selected = 1, 2, 3, 4; AUTDLY = 0.
23.4.26 Data management
Data register, data alignment and offset (ADC_DR, ADC_JDRy, OFFSETy, OFFSETy_CH, OVSS, LSHIFT, JOVSS (a) , JLSHIFT (a) , USAT, SSAT, POSOFF)
Data and alignment
At the end of each regular channel conversion (when an EOC event occurs), the result of the converted data is stored in the 32-bit wide ADC_DR data register with FIFO (when OVRMOD = 0). Since the data register has eight levels of FIFO, the EOC flag is raised again as far as the FIFO is not emptied.
At the end of each injected channel conversion (when a JEOC event occurs), the result of the converted data is stored in the 32-bit wide corresponding ADC_JDRy data register.
The OVSS[3:0], LSHIFT[3:0], JOVSS[3:0], and JLSHIFT[3:0] bitfields in the ADC_CFGR2 register select the alignment of the data stored after the conversion. By default, data are right-aligned. Refer to Figure 194 , Figure 195 , Figure 196 , and Figure 197 for examples of data alignment.
Note:
The data can be aligned in normal and oversampling mode. The OVSS[3:0] bitfield is only effective in oversampling mode.
JOVSS[3:0] and JLSHIFT[3:0] is reserved for injected conversions. Their usage is the same as OVSS[3:0] and LSHIFT[3:0], unless otherwise specifically described.
Offset
An unsigned offset value y (y = 1, 2, 3, 4) can be applied to a channel by programming a value different from 0 in the OFFSET[21:0] bitfield of the ADC_OFRy register. The channel to which the offset is applied is programmed to the OFFSETy_CH[4:0] bits of ADC_OFCFGRy register. The offset can be positive or negative depending on the value of POSOFF bit. When POSOFF is cleared, the converted value is subtracted by the user-defined offset written in OFFSET[21:0] bits. The result can be a negative value. The read data is consequently signed and the SEXT bit represents the extended sign value.
The offset value must be lower than the maximum conversion value (for example the maximum offset value is 0xFFF in 12-bit mode).
The offset can be used to convert unsigned data to signed data (for example the offset value is equal to 0x800 in 12-bit mode).
The offset correction is also supported in oversampling mode. In this mode, the offset is subtracted when all the oversampling operations are complete.
Note: If the OFFSET channel is selected but the offset value is 0x0000, this offset programming is ignored. If the same OFFSET channel is programmed in different registers multiple times, the first programmed register takes priority.
Table 215 describes how the computation is performed for all the possible ADC resolutions and offset settings.
a. Only for products that include this bit.
Table 210. Offset computation versus data resolution
| Resolution (RES[1:0] bits) | Subtraction between raw converted data and offset | Result | Comments | |
|---|---|---|---|---|
| Raw converted Data, left aligned | Offset | |||
| 00: 12-bit | DATA[11:0] | OFFSET[11:0] | Signed or unsigned 24-bit data, right aligned to [11:0] | - |
| 01: 10-bit | DATA[11:2],00 | OFFSET[11:2] | Signed or unsigned 24-bit data, right aligned to [9:0] | The user must configure OFFSET[1:0] to 0b00. |
| 10: 8-bit | DATA[11:4],0000 | OFFSET[11:4] | Signed or unsigned 24 bit data right aligned to [7:0] | The user must configure OFFSET[3:0] to 0b0000. |
| 11: 6-bit | DATA[11:6],000000 | OFFSET[11:6] | Signed or unsigned 24 bit data right aligned to [5:0] | The user must configure OFFSET[5:0] to 0b000000. |
Figure 194, Figure 195, Figure 196 and Figure 197 show alignments for signed and unsigned data. JOVSS and JLSHIFT are not described here, but they behave the same as OVSS and LSHIFT.
Figure 194. Right alignment (offset disabled, unsigned value)

The diagram illustrates the right alignment of ADC data for different resolutions and offset settings. It shows the mapping of raw data bits (D11..D0, D9..D0, D7..D0) into a 32-bit register, considering the resolution and the offset value (OVSR).
- 12-bit data: The raw data D11..D0 is right-aligned to bits 11:0. The register layout is: [0000] [0] [D11..D0].
- 10-bit data: The raw data D9..D0 is right-aligned to bits 9:0. The register layout is: [0000] [0] [D9..D0].
- 8-bit data: The raw data D7..D0 is right-aligned to bits 7:0. The register layout is: [0000] [00] [D7..D0].
- 12-bit data, OVSR = 1024: The raw data D21..D0 is right-aligned to bits 21:0. The register layout is: [00] [D21..D0]. OVSS = 0000.
- 12-bit data, OVSR = 1024: The raw data D11..D0 is right-aligned to bits 11:0. The register layout is: [0000] [D11..D0]. OVSS = 1010.
Bit positions 31, 15, 11, 9, 7, and 0 are indicated above the register diagrams.
MSV66828V3
Figure 195. Right alignment (offset enabled, signed value)

Figure 195 illustrates the right alignment of ADC data when offset is enabled and the value is signed. The diagram shows five examples of data alignment within a 32-bit register:
- 12-bit data: Bits D11..D0 are aligned to bits 11..0. Bits 31..12 are filled with SEXT (sign extension). Bit 31 is the sign bit. This format is described as "Signed 32-bit or 16-bit format".
- 10-bit data: Bits D9..D0 are aligned to bits 9..0. Bits 31..10 are filled with SEXT.
- 8-bit data: Bits D7..D0 are aligned to bits 7..0. Bits 31..8 are filled with SEXT.
- 8-bit data: Bits D6..D0 are aligned to bits 6..0. Bits 31..7 are filled with SEXT. This format is described as "Signed 8-bit format" with SSAT = 1.
- 12-bit data (OVSR = 1024): Bits D21..D0 are aligned to bits 21..0. Bits 31..22 are filled with SEXT. This format is described as "Signed 8-bit format" with OVSS = 0000.
Bit positions 31, 15, 11, 9, 7, and 0 are marked with vertical dashed lines to indicate alignment boundaries.
MSV66829V3
Figure 196. Left alignment (offset disabled, unsigned value)

Figure 196 illustrates the left alignment of ADC data when offset is disabled and the value is unsigned. The diagram shows four examples of data alignment within a 32-bit register:
- 12-bit data: Bits D11..D0 are aligned to bits 23..12. Bits 31..24 are filled with 0000. Bit 3 is 0. This format is described as "LSHIFT = 4".
- 10-bit data: Bits D9..D0 are aligned to bits 23..14. Bits 31..24 are filled with 0000. Bit 5 is 0. This format is described as "LSHIFT = 6".
- 8-bit data: Bits D7..D0 are aligned to bits 23..16. Bits 31..24 are filled with 0000. Bit 7 is 0. This format is described as "LSHIFT = 0".
- 12-bit data (OVSR=1024): Bits D21..D0 are aligned to bits 31..20. Bit 9 is 0. This format is described as "LSHIFT = 10".
Bit positions 31, 23, 15, 3, and 0 are marked with vertical dashed lines to indicate alignment boundaries.
MSV66830V3
Figure 197. Left alignment (offset enabled, signed value)

The diagram illustrates the internal bit representation of ADC data when left-aligned with offset enabled. It shows five examples:
- 12-bit data: Bits 31-16 are SEXT, 15-0 are D11..D0. LSHIFT = 3. Result: Signed 16-bit format.
- 10-bit data: Bits 31-16 are SEXT, 15-3 are D9..D0, 2-0 are 0. LSHIFT = 5. Result: Signed 16-bit format.
- 8-bit data: Bits 31-16 are SEXT, 15-8 are D7..D0, 7-0 are 0. LSHIFT = 7. Result: Signed 16-bit format.
- 8-bit data: Bits 31-8 are SEXT, 7-0 are D6..D0. SSAT = 1. Result: Signed 8-bit format.
- 12-bit data (OVSR = 1024): Bit 31 is S, 30-16 are D21..D0, 15-0 are 0. LSHIFT = 9. Result: Signed 32-bit format.
MSv66831V3
Management of signed and unsigned saturation format (SSAT, USAT)
The offset correction might result in the data width to be wider than the original data.
To limit the original data width, the data saturation can be enabled through the SSAT and USAT bits of the ADC_OFCFGRy register.
Unsigned 12-bit data can be extended to 13-bit signed data by using an offset value different from 0x800.
The original data width can be preserved by setting SSAT bit to limit the data width to 12 bits.
Unsigned data can be saturated to the original data width by setting the USAT bit.
Table 211 shows the sign-extended data format corresponding to different resolutions.
Table 211.12-bit data formats
| SSAT | USAT | Format | Data range (offset =0x800) |
|---|---|---|---|
| 0 | 0 | Sign-extended 13-bit significant data: SEXT[31:13] DATA[12:0] | 0x0000 07FF - 0xFFFF F800 |
| 1 | 0 | Sign-extended 12-bit significant data: SEXT[31:12] DATA[11:0] | 0x7FF - 0x800 |
Table 211.12-bit data formats
| SSAT | USAT | Format | Data range (offset =0x800) |
|---|---|---|---|
| 0 | 1 | Unsigned saturation 12-bit signification data: DATA[11:0] | 0xFFF - 0x000 |
| 1 | 1 | Reserved | - |
Table 212 provides numerical examples for four different offset values.
Table 212. Numerical examples for 32-bit or 16-bit format (POSSPFF = 0)
| Raw conversion result | Offset value | Result SSAT = 0 USAT = 0 | Result SSAT = 0 USAT = 1 | Result SSAT = 1 USAT = 0 |
|---|---|---|---|---|
| 0xFFF | 0x800 | 0x0000 07FF | 0x07FF | 0x07FF |
| 0x800 | 0x0000 0000 | 0x0000 | 0x0000 | |
| 0x000 | 0xFFFF F800 | 0x0000 | 0xF800 | |
| 0xFFF | 0x820 | 0x0000 07DF | 0x07DF | 0x07DF |
| 0x800 | 0xFFFF FFE0 | 0x0000 | 0xFFE0 | |
| 0x000 | 0xFFFF F7E0 | 0x0000 | 0xF7E0 | |
| 0xFFF | 0x7E0 | 0x0000 081F | 0x081F | 0x07FF |
| 0x800 | 0x0000 0020 | 0x0020 | 0x0020 | |
| 0x000 | 0xFFFF F820 | 0x0000 | 0xF820 | |
| 0xFFF | 0x020 | 0x0000 0FDF | 0x0FDF | 0x0FDF |
| 0x800 | 0x0000 07E0 | 0x07E0 | 0x07E0 | |
| 0x000 | 0xFFFF FFE0 | 0x0000 | 0xFFE0 |
Caution: SSAT must not be used in conjunction with USAT. No hardware check is performed to ensure that this condition is respected.
Gain compensation
When the GCOMP bit is set in the ADC_GCOMP register, the gain compensation is activated on all the converted data. After each conversion, data is calculated using the following formula.
As GCOMPCOEFF can be programmed from 0 to 16383, the actual gain compensation factor can range from 0 to 3.999756.
Before storing the resulting data in RDATAx or JDATAx bitfields, the LSB - 1 value is evaluated to round up the data and minimize the error.
The gain compensation is also effective for the oversampling. When the gain compensation is used in oversampling mode, the gain calculation is performed after the accumulation and
right-shift operations to minimize the power consumption (the gain calculation is done only once and not at each conversion).
The internal multiplier width is 32 bits and the input data width for the gain compensation must be less than 18 bits. When using oversampling with injected and regular conversion mode, the ROVSM bit of the ADC_CFGR2 register must be set to resume the pending conversion with the correct value.
When the gain compensation is activated, the ADC data latency is increased by one clock cycle. In continuous and scan conversion modes, the ADC conversion rate does not change.
ADC overrun (OVR, OVRMOD)
The overrun flag (OVR) issues a notification that the regular converted data has not been read (by the CPU or the DMA) before the ADC_DR FIFO (eight stages) is overflowed, or adc_hclk clock is too slow to manage the data.
The OVR flag is set when a new conversion completes while ADC_DR as single register or FIFO output is full. An interrupt is generated if the OVRIE bit is set.
When an overrun condition occurs, the ADC is still operating and can continue converting unless the software decides to stop and reset the sequence by setting ADSTP. The OVR flag is cleared by software by programming it to 1.
Data can be configured to be preserved or overwritten when an overrun event occurs by programming the control bit OVRMOD:
- • OVRMOD = 0
The overrun event preserves the data register from being overwritten: the old data are maintained up to ADC_DR FIFO depth (eight data) and the new conversion is discarded and lost. If OVR remains at 1, further conversions occur but the result data is also discarded. The FIFO can be emptied through ADC_DR read access by the CPU while the OVR flag is set.
- • OVRMOD = 1
The data register is overwritten with the last conversion result and the previous unread data is lost. In this mode, ADC_DR FIFO is disabled. If OVR remains at 1, any further conversion is performed normally and the ADC_DR register always contains the latest converted data. In this mode, DMA burst mode nor ADF output mode cannot be supported.
Figure 198. Example of overrun (OVRMOD = 0)

This timing diagram illustrates an overrun condition in an ADC when OVRMOD is set to 0. The diagram shows the following signals and states over time:
- ADSTART : A software trigger signal that starts the conversion sequence.
- EOC : End of Conversion signal, which pulses high when each conversion is complete.
- OVR : Overrun flag, which goes high when a new conversion result is ready before the previous one has been read.
- ADSTP : A software stop signal that ends the conversion sequence.
- TRGx : A hardware trigger signal.
- ADC state : Shows the sequence of states: RDY, CH1, CH2, CH3, CH4, ..., CH11, CH12, CH13, STOP, RDY.
- ADC_DR read access : Shows the timing of software reads from the ADC data register.
- ADC_DR : The data register, showing values D1, D2, D3, D4, D5, D9, D10, na, D12. The value 'na' indicates an overrun where the data is invalid.
- ADC_DR (FIFO_DATA) : A FIFO buffer showing the sequence of data: D4, D5, D9, D10, D10, na, D12.
Legend for signal transitions:
- by s/w (software): solid line with upward arrow
- by h/w (hardware): dashed line with upward arrow
- triggered: dotted line with upward arrow
Indicative timings are shown. MSv69549V1
Figure 199. Example of overrun (OVRMOD = 1)

This timing diagram illustrates an overrun condition in an ADC when OVRMOD is set to 1. The diagram shows the following signals and states over time:
- ADSTART : A software trigger signal that starts the conversion sequence.
- EOC : End of Conversion signal, which pulses high when each conversion is complete.
- EOS : End of Sequence signal, which goes high when the last conversion in the sequence is complete.
- OVR : Overrun flag, which goes high when a new conversion result is ready before the previous one has been read.
- ADSTP : A software stop signal that ends the conversion sequence.
- TRGx : A hardware trigger signal.
- ADC state : Shows the sequence of states: RDY, CH1, CH2, CH3, CH4, CH5, CH6, CH7, STOP, RDY.
- ADC_DR read access : Shows the timing of software reads from the ADC data register. An 'Overrun' label points to a missed read opportunity for CH5.
- ADC_DR (OVRMOD=1) : The data register, showing values D1, D2, D3, D4, D5, D6.
Legend for signal transitions:
- by s/w (software): solid line with upward arrow
- by h/w (hardware): dashed line with upward arrow
- triggered: dotted line with upward arrow
Indicative timings are shown. MSv31019V2
Note: Even if overrun may occur for injected channels, there is no overrun detection on these channels since there is a dedicated data register for each of the four injected channels.
Managing a sequence of conversions without using the DMA
If the conversions are slow enough, the conversion sequence can be handled by the software. In this case the software must use the EOC flag and its associated interrupt to handle each data. Each time a conversion is complete, EOC is set and the ADC_DR register can be read. OVRMOD must be configured to 0 to manage overrun events or FIFO overflow as errors.
Managing conversions without using the DMA and without overrun
It may be useful to let the ADC convert one or more channels without reading the data each time (if there is an analog watchdog for instance). In this case, the OVRMOD bit must be configured to 1 and the OVR flag must be ignored by the software. An overrun event does not prevent the ADC from continuing to convert and the ADC_DR register always contains the latest conversion.
Managing conversions using the DMA
When the DMA mode is enabled (DMNGT[1:0] = 01 or 11 in the ADC_CFGR1 register in single ADC mode), a DMA request is generated after each channel conversion. This allows the transfer of the converted data from the ADC_DR register to the destination location configured in the DMA.
Despite this, if an overrun occurs (OVR = 1) because the DMA cannot serve the DMA transfer request in time, the ADC stops generating DMA requests and the data corresponding to the new conversion is not transferred by the DMA, which means that all the data transferred to the RAM can be considered as valid. (OVRMOD = 0).
When OVRMOD = 1, even if DMA does not transfer the data immediately, new data overwrite ADC_DR, causing DMA to potentially skip data. As a result, some conversion results may be missed in the data transferred to RAM.
Depending on the configuration of the OVRMOD bit, the data are either preserved or overwritten (refer to Section : ADC overrun (OVR, OVRMOD) ). If OVRMOD = 0 (data preserved), DMA transfer requests are blocked.
DMA can be configured through the DMNGT[1:0] bitfield of the ADC_CFGR1 register. Refer to Section 23.4.31: Dual ADC modes for information on DMA usage with dual ADC mode.
- • DMA one-shot mode (DMNGT[1:0] = 01)
This mode is suitable when the DMA is programmed to transfer a fixed number of data. - • DMA circular mode (DMNGT[1:0] = 11)
This mode is suitable when programming the DMA when the number of transfers is unknown.
DMA one-shot mode (DMNGT[1:0] = 01)
In one-shot mode, the ADC generates a DMA transfer request each time a new conversion data is available and stops generating DMA requests once the DMA has reached the last DMA transfer (that is when DMA_LACK interrupt occurs, see Direct-memory controller section) even if a new conversion has been started.
When DMA transfers are complete (all the transfers configured in the DMA controller have been done):
- • The content of the ADC data register is frozen.
- • All ongoing conversions are aborted with the partial result discarded.
- • The scan sequence is stopped and reset.
- • The DMA and ADC are stopped.
DMA circular mode (DMNGT[1:0] = 11)
In circular mode, the ADC generates a DMA transfer request each time a new conversion data is available in the data register. This allows the configuration of the DMA in circular mode to handle a continuous analog input data stream.
DMA single-transfer or burst mode with FIFO (OVRMOD = 0)
The output data register features an eight-stage FIFO. Two different DMA requests are generated in parallel. When a data is available, an “SREQ single request” is generated. When four data are available, a “BREQ burst request” is generated. The DMA can be programmed either in single-transfer mode or in burst mode (four beats). The appropriate request line is selected by the DMA according to the mode selected. Refer to Section Direct memory access controller for further information.
Due to the existence of FIFO, DMA requests are generated until the FIFO is emptied. To stop DMA requests even when the FIFO is not emptied, set the ADSTP bit.
DMA for dual mode
Refer to Section 23.4.31: Dual ADC modes .
23.4.27 Managing conversions using the ADF
The ADC conversion results can be transferred directly to the ADF.
In this case, the DMNGT[1:0] bits must be set to 10.
The ADC transfers the 16 least significant bits of the regular data register to the ADF through adcx_dat[15:0] bus, which in turn resets the EOC flag once the transfer is effective.
The data format must be in 16-bit signed format:
ADC_DR[31:16] = Don't care
ADC_DR[15] = Sign
ADC_DR[14:0] = Data
Any value above the 16-bit signed format is truncated.
To obtain a 16-bit signed format, the OFFSET function needs to be activated.
In this mode, OVRMOD = 1 is not supported.
23.4.28 Dynamic low-power features
Autodelayed conversion mode (AUTDLY)
The ADC implements an autodelayed conversion mode controlled by the AUTDLY configuration bit in ADC_CFGR1. Autodelayed conversions are useful to simplify the software as well as to optimize performance of an application clocked at low frequency where there must be risk of encountering an ADC overrun.
Regular conversion mode
When AUTDLY is set, a new conversion can start if the following conditions are met:
- • The ADC_DR register is read or the EOC bit is cleared (see Figure 200 ).
This is a way to automatically adapt the speed of the ADC to the speed of the system that reads the data and prevent overrun errors.
The delay is inserted after each regular conversion.
Injected conversion mode
When AUTDLY is set, a new conversion can start only if the JEOS bit has been cleared (see Figure 201 ). Since there are four ADC_JDRy registers, the autodelay is performed at the end on the injected conversion sequence.
There is no delay inserted between each conversion of the injected sequence, except after the last one.
A hardware trigger event occurring during this delay is ignored.
No delay is inserted between regular and injected conversions. The autodelay for regular and injected modes is managed separately.
Caution: The behavior is slightly different in autoinjection mode (JAUTO = 1) where a new regular conversion can start only when the automatic delay of the previous injected sequence of conversion has ended (when JEOS has been cleared). This is to ensure that the software can read all the data of a given sequence before starting a new sequence (see Figure 204 ).
In autoinjection mode, there is no delay between the last regular conversion and the first injected conversion. The user must clear the last EOC flag before clearing the JEOS flag, otherwise the next sequence might start before EOC flag is cleared.
In autodelay mode, a hardware regular trigger event is ignored if it occurs during an already ongoing regular sequence or during the delay that follows the last regular conversion of the sequence. It is however considered pending if it occurs after this delay, even if it occurs during an injected sequence of the delay that follows it. The conversion then starts at the end of the delay of the injected sequence.
In autodelay mode with JAUTO = 0, a hardware injected trigger event is ignored if it occurs during an already ongoing injected sequence or during the delay that follows the last injected conversion of the sequence.
Note: AUTDLY mode is not supported with injected queue, SMPTRIG, or BULB mode.
Figure 200. AUTDLY = 1, regular conversion in continuous mode, software trigger

Timing diagram for Figure 200. The diagram shows the following signals and states over time:
- ADSTART(1) : Software trigger, active high. It is shown going high to start the conversion sequence and low to stop it.
- EOC : End of Conversion signal, pulses high when a conversion is complete.
- EOS : End of Sequence signal, goes high when the last channel in the sequence (CH3) is converted.
- ADSTP : Stop conversion signal, goes high to terminate the sequence.
- ADC_DR read access : Indicated by pulses when the data register is read.
- ADC state : Shows the sequence of states: RDY (Ready), CH1, DLY (Delay), CH2, DLY, CH3, DLY, CH1, DLY, STOP, RDY.
- ADC_DR : Data register values: D1, D2, D3, D1.
- Triggers : 'by SW' (software) and 'by HW' (hardware) are indicated at the bottom.
- Indicative timings : A label for the timing diagram.
- MS31020V1 : Reference code.
- 1. AUTDLY = 1, JAUTO = 0.
- 2. Regular configuration: EXTEN[1:0] = 00 (software trigger), CONT = 1, CHANNELS = 1, 2, 3.
- 3. Injected configuration DISABLED.
Figure 201. AUTDLY = 1, regular hardware conversions interrupted by injected conversions (DISCEN = 0; JDISCEN = 0)

Timing diagram for Figure 201. The diagram shows the following signals and states over time:
- Regular trigger : Hardware trigger for regular conversions. One occurrence is labeled 'Ignored' and another 'Not ignored (occurs during injected sequence)'.
- ADC state : Shows the sequence of states: RDY, CH1 (regular), DLY (CH1), CH2 (regular), DLY (CH2), CH5 (injected), CH6 (injected), CH3 (regular), DLY (CH3), CH1 (regular), DLY (CH1), CH2 (regular).
- EOC : End of Conversion signal, pulses high when a conversion is complete.
- EOS : End of Sequence signal, goes high when the last channel in the sequence (CH3) is converted.
- ADC_DR read access : Indicated by pulses when the data register is read.
- ADC_DR : Data register values: D1, D2, D3, D1.
- Injected trigger : Hardware trigger for injected conversions. One occurrence is labeled 'Ignored'.
- JEOS : End of Injected Sequence signal, goes high when the last injected channel (CH6) is converted.
- ADC_JDR1 : Injected data register 1 value: D5.
- ADC_JDR2 : Injected data register 2 value: D6.
- Triggers : 'by s/w' (software) and 'by h/w' (hardware) are indicated at the bottom.
- Indicative timings : A label for the timing diagram.
- MS31021V2 : Reference code.
- 1. AUTDLY = 1, JAUTO = 0.
- 2. Regular configuration: EXTEN[1:0] = 01 (hardware trigger), CONT = 0, DISCEN = 0, CHANNELS = 1, 2, 3.
- 3. Injected configuration: JEXTEN[1:0] = 01 (hardware trigger), JDISCEN = 0, CHANNELS = 5, 6.
Figure 202. AUTDLY = 1, regular hardware conversions interrupted by injected conversions (DISCEN = 1, JDISCEN = 1)

This timing diagram illustrates the ADC operation when AUTDLY = 1 , DISCEN = 1 , and JDISCEN = 1 . The diagram shows the sequence of regular and injected conversions, triggered by hardware (HW) or software (SW).
- Regular trigger: Hardware triggers (rising edges) initiate regular conversions. The first trigger is ignored because the ADC is not in the RDY state. Subsequent triggers occur while the ADC is still processing previous conversions and are also ignored.
- ADC state: The state transitions between RDY (Ready) and active conversion phases for channels CH1 , CH2 , CH5 , CH6 , and CH3 .
- Delays (DLY):
- DLY (CH1) , DLY (CH2) , and DLY (CH3) are delays between the start of a regular conversion and the start of the next one.
- DLY (inj) is the delay between the start of an injected conversion and the start of the next regular conversion.
- Injected conversions:
- Injected conversions for CH5 and CH6 are initiated by hardware triggers. They occur while regular conversions are still active.
- Subsequent hardware triggers for injected conversions are ignored.
- EOC (End of Conversion):
Pulses indicate the completion of a conversion group.
- The first EOC pulse marks the end of the first regular conversion group ( CH1 , CH2 ).
- A second EOC pulse marks the end of the injected conversion group ( CH5 , CH6 ).
- A third EOC pulse marks the end of the next regular conversion group ( CH3 , CH1 , CH2 ).
- ADC_DR (Data Register): Shows the sequence of data values: D1 (regular), D2 (injected), D3 (regular), D5 (injected), D6 (injected), and D1 (regular again).
- Legend:
- by SW (Software trigger): Indicated by a rising edge with a square wave symbol.
- by HW (Hardware trigger): Indicated by a rising edge with a triangle wave symbol.
- Indicative timings: A label for the timing arrows.
MS31022V1
- 1. AUTDLY = 1, JAUTO = 0.
- 2. Regular configuration: EXTEN[1:0] = 01 (hardware trigger), CONT = 0, DISCEN = 1, DISCNUM = 1, CHANNELS = 1, 2, 3.
- 3. Injected configuration: JEXTEN[1:0] = 01 (hardware trigger), JDISCEN = 1, CHANNELS = 5, 6.
Figure 203. AUTDLY = 1, regular continuous conversions interrupted by injected conversions

This timing diagram illustrates the ADC operation when AUTDLY = 1 and continuous regular conversions are interrupted by injected conversions. The diagram shows the sequence of regular and injected conversions, triggered by software (SW) or hardware (HW).
- ADSTART (1) : A software trigger (rising edge) initiates the continuous regular conversion sequence.
- ADC state: The state transitions between RDY and active conversion phases for channels CH1 , CH2 , CH5 , CH6 , CH3 , and CH1 again.
- Delays (DLY):
- DLY (CH1) , DLY (CH2) , and DLY (CH3) are delays between the start of a regular conversion and the start of the next one.
- DLY (inj) is the delay between the start of an injected conversion and the start of the next regular conversion.
- Injected conversions:
- Injected conversions for CH5 and CH6 are initiated by hardware triggers. They occur while regular conversions are still active.
- Subsequent hardware triggers for injected conversions are ignored.
- EOC (End of Conversion):
Pulses indicate the completion of a conversion group.
- The first EOC pulse marks the end of the first regular conversion group ( CH1 , CH2 ).
- A second EOC pulse marks the end of the injected conversion group ( CH5 , CH6 ).
- A third EOC pulse marks the end of the next regular conversion group ( CH3 , CH1 , CH2 ).
- ADC_DR (Data Register): Shows the sequence of data values: D1 (regular), D2 (injected), D3 (regular), D5 (injected), D6 (injected), and D3 (regular again).
- Legend:
- by s/w (Software trigger): Indicated by a rising edge with a square wave symbol.
- by h/w (Hardware trigger): Indicated by a rising edge with a triangle wave symbol.
- Indicative timings: A label for the timing arrows.
MS31023V3
- 1. AUTDLY = 1, JAUTO = 0.
- 2. Regular configuration: EXTEN[1:0] = 00 (software trigger), CONT = 1, DISCEN = 0, CHANNELS = 1, 2, 3.
- 3. Injected configuration: JEXTEN[1:0] = 01 (hardware trigger), JDISCEN = 0, CHANNELS = 5, 6.
Figure 204. AUTDLY = 1 in autoinjection mode (JAUTO = 1)

- 1. AUTDLY = 1.
- 2. Regular configuration: EXTEN[1:0] = 00 (software trigger), CONT = 1, DISCEN = 0, CHANNELS = 1, 2.
- 3. Injected configuration: JAUTO = 1, CHANNELS = 5, 6.
23.4.29 Analog window watchdog (AWD1EN, JAWD1EN, AWD1SGL, AWD1CH, AWDCH of ADC_AWD2CR and ADC_AWD3CR, HTR, LTR, AWDFILT)
Table 213. Analog window watchdog features
| Feature | AWD1 | AWD2 | AWD3 |
|---|---|---|---|
| Enable control | AWD1EN or JAWD1EN | ADC_AWD2CR | ADC_AWD3CR |
| Channel selection | AWD1CH[4:0]/AWD1SGL | ADC_AWD2CR | ADC_AWD3CR |
| Channel selection limitation | One or all channels | Any number of channels | |
| Regular or injected | - | - | |
| Threshold control | ADC_AWD1LTR / ADC_AWD1HTR | ADC_AWD2LTR / ADC_AWD2HTR | ADC_AWD3LTR / ADC_AWD3HTR |
| Filter configuration | AWDFILT[2:0] in ADC_AWDyHTR | ||
| Interrupt | AWDy in ADC_ISR | ||
The three AWD analog watchdogs monitor whether some channels remain within a configured voltage range (window).
Figure 205. Analog watchdog guarded area

AWDy flag and interrupt
An interrupt can be enabled for each of the three analog watchdogs by setting AWDyIE in the ADC_IER register (y = 1, 2, 3).
AWDy (y = 1, 2, 3) flag is cleared by software by writing 1 to it, or by setting ADDIS.
The ADC conversion result is compared to the lower and higher thresholds before alignment.
Description of analog watchdog 1
The AWD analog watchdog 1 is enabled by setting the AWD1EN or JAWD1EN bit in the ADC_CFGR1 register. This watchdog monitors whether either one selected channel or all enabled channels remain within a configured voltage range (window).
Table 214 shows how the ADC_CFGR1 registers must be configured to enable the analog watchdog on one or more channels.
Table 214. Analog watchdog 1 channel selection
| Channels guarded by the analog watchdog | AWD1SGL bit | AWD1EN bit | JAWD1EN bit |
|---|---|---|---|
| None | x | 0 | 0 |
| All injected channels | 0 | 0 | 1 |
| All regular channels | 0 | 1 | 0 |
| All regular and injected channels | 0 | 1 | 1 |
| Single (1) injected channel | 1 | 0 | 1 |
| Single (1) regular channel | 1 | 1 | 0 |
| Single (1) regular or injected channel | 1 | 1 | 1 |
1. Selected by the AWD1CH[4:0] bits. The channels must also be programmed to be converted in the appropriate regular or injected sequence.
The AWD1 analog watchdog flag is set if the analog voltage converted by the ADC is below a lower threshold or above a higher threshold.
These thresholds are programmed through HTR[22:0] bits of the ADC_AWD1HTR register and LTR[22:0] bits of the ADC_AWD1LTR register for the analog watchdog 1.
The threshold can be up to 23 bits (12-bit resolution with oversampling, OVSR = 1024, offset and gain compensation)
When converting data with a resolution of less than 12 bits (defined by RES[1:0] bits), the LSB of the programmed thresholds must be kept cleared because the internal comparison is always performed on the full 12-bit raw converted data.
Table 215 describes how the comparison is performed for all the possible resolutions and for analog watchdog 1.
Table 215. Analog watchdog 1, 2, 3 comparison
| Resolution (RES[1:0] bits) | Analog watchdog comparison between: | Comments | |
|---|---|---|---|
| Raw converted data, left aligned (1) | Thresholds | ||
| 00: 12-bit | DATA[11:0] | LTR[22:0] and HTR[22:0] | - |
| 01: 10-bit | DATA[11:2],00 | LTR[22:0] and HTR[22:0] | The user must configure LTR[1:0] to 0b00 and HTR[1:0] to 0b00. |
| 10: 8-bit | DATA[11:4],0000 | LTR[22:0] and HTR[22:0] | The user must configure LTR[3:0] to 0b0000 and HTR[3:0] to 0b0000. |
| 11: 6-bit | DATA[11:6],000000 | LTR[22:0] and HTR[22:0] | The user must configure LTR[5:0] to 0b000000 and HTR[5:0] to 0b000000. |
1. Refer to Section : Gain compensation for additional details on analog watchdog comparison.
Description of analog watchdog 2 and 3
The second and third analog watchdogs are more flexible and can guard several selected channels by programming the corresponding bits in AWDCH[18:0] (of ADC_AWD2CR and ADC_AWD3CR).
The corresponding watchdog is enabled when any bit of AWDCH[18:0] (of ADC_AWD2CR and ADC_AWD3CR) is set.
The threshold can be up to 23 bits (12-bit resolution with oversampling, OVSR = 1024 and offset compensation in signed format with gain compensation) and is programmed through the ADC_AWD2HTR, ADC_AWD2LTR, ADC_AWD3HTR and ADC_AWD3LTR registers.
When converting data with a resolution of less than 12 bits (defined by RES[1:0] bits), the LSBs of the programmed threshold must be kept cleared, the internal comparison being performed on the full 12-bits converted data (left aligned).
ADCx_AWDy_OUT signal output generation
Each analog watchdog is associated with an internal hardware signal ADC_AWDy_OUT (y being the watchdog number), which is directly connected to the ETR input (external trigger) of some of the on-chip timers. Refer to the on-chip timers sections to understand how to select the ADC_AWDy_OUT signal as ETR.
ADC_AWDy_OUT is activated when the associated analog watchdog is enabled:
- • ADC_AWDy_OUT is set when a guarded conversion is outside the programmed thresholds.
- • ADC_AWDy_OUT is reset after the end of the next guarded conversion that is inside the programmed thresholds (It remains at 1 if the next guarded conversions are still outside the programmed thresholds).
- • ADC_AWDy_OUT is also reset when disabling the ADC (when setting ADDIS). Note that stopping regular or injected conversions (by setting ADSTP or JADSTP) has no influence on the generation of ADCx_AWDy_OUT.
Note: The AWDy flag is set by hardware and reset by software: the AWDy flag has no influence on the generation of ADC_AWDy_OUT (ex: ADC_AWDy_OUT can toggle while the AWDy flag remains at 1 if the software did not clear the flag).
The AWDy flag is cleared by programming it to 1 or by set ADDIS bit. ADSTP and JADSTP bits do not reset the AWDy flag.
Figure 206. ADC_AWDy_OUT signal generation (on all regular channels)

The timing diagram illustrates the relationship between the ADC state, end-of-conversion flags, analog watchdog flags, and the AWDy_OUT signal during a sequence of seven regular conversions. The top signal, ADCSTATE, shows a 'RDY' state followed by 'Conversion1' through 'Conversion7'. Each conversion is marked as either 'inside' or 'outside' the programmed thresholds: Conversion1 (inside), Conversion2 (outside), Conversion3 (inside), Conversion4 (outside), Conversion5 (outside), Conversion6 (outside), and Conversion7 (inside). The EOCFLAG signal pulses high at the end of each conversion. The AWDyFLAG signal is set high when a conversion is 'outside' the thresholds (Conversions 2, 4, 5, and 6) and is manually 'cleared by S/W' (software) after each such event. The ADC_AWDy_OUT signal is shown toggling: it goes high when a conversion is outside the thresholds and returns low when the subsequent conversion is inside the thresholds (e.g., after Conversion 3, 5, and 7).
- - Converting regular channels 1,2,3,4,5,6,7
- - Regular channels 1,2,3,4,5,6,7 are all guarded
MSV66832V1
Figure 207. ADC_AWDy_OUT signal generation (AWDy flag not cleared by software)

ADCSTATE: RDY | Conversion1 (inside) | Conversion2 (outside) | Conversion3 (inside) | Conversion4 (outside) | Conversion5 (outside) | Conversion6 (outside) | Conversion7 (inside)
EOCFLAG: Pulses at the end of each conversion.
AWDy FLAG: Set by Conversion2, not cleared by S/W.
ADC_AWDy_OUT: High during Conversion2, Conversion3, and Conversion7.
- - Converting regular channels 1,2,3,4,5,6,7
- - Regular channels 1,2,3,4,5,6,7 are all guarded
MSv66833V1
Figure 208. ADC_AWDy_OUT signal generation (on a single regular channel)

ADCSTATE: Conversion1 (outside) | Conversion2 | Conversion1 (inside) | Conversion2 | Conversion1 (outside) | Conversion2 | Conversion1 (outside) | Conversion2
EOCFLAG: Pulses at the end of each conversion.
EOSFLAG: Pulses at the end of each pair of conversions.
AWDy FLAG: Set by Conversion1 (inside), cleared by S/W.
ADC_AWDy_OUT: High only during Conversion1 (inside).
- -Converting regular channels 1 and 2
- -Only channel1 is guarded
MSv66834V1
Figure 209. ADC_AWDy_OUT signal generation (on all injected channels)

The diagram illustrates the timing of the ADC_AWDy_OUT signal during a sequence of injected channel conversions. The top signal, ADCSTATE, shows a series of states: RDY, followed by Conversion1 (inside), Conversion2 (outside), Conversion3 (inside), Conversion4 (outside), Conversion5 (outside), Conversion6 (outside), and Conversion7 (inside). The JEOSFLAG signal pulses high at the end of each conversion. The AWDy FLAG signal goes high when a conversion is 'outside' the threshold (Conversions 2, 4, 5, 6) and is manually cleared by software (S/W) after each such conversion. The ADC_AWDy_OUT signal follows the AWDy FLAG, going high when the flag is high and low when it is cleared or when all conversions are 'inside' (like Conversion1, 3, 7). A legend box states: '-Converting the injected channels 1, 2, 3, 4' and '-All injected channels 1, 2, 3, 4 are guarded'. The identifier MSv66835V1 is in the bottom right corner.
Analog watchdog threshold control on the fly
LTR[22:0] and HTR[22:0] can be changed when an analog-to-digital conversion is ongoing (that is between the start of conversion and the end of conversion of the ADC internal state). If LTR[22:0] and HTR[22:0] are updated during the ADC conversion of the ADC guarded channel, resulting in analog watchdog thresholds to be applied from the next ADC conversion. The analog watchdog comparison is performed at each end of conversion. If the current ADC data is out of the new modified threshold, no interrupt and AWDy_OUT signal are issued. The Interrupt and the AWD generation only happen at the end of the conversion that started after the threshold update. If AWDy_OUT is already asserted, programming the new thresholds does not deassert the AWDy_OUT signal. However, the watchdog threshold must not be changed twice during the four adc_ker_ck periods.
Analog watchdog filter for watchdog 1
With analog watchdog, a valid ADC conversion data range can be configured through the ADC_AWD1LTR and ADC_AWD1HTR registers. When the conversion results have consecutively passed the threshold for more than the watchdog filter value (AWDFILT[2:0] + 1), AWD1_OUT is generated as well as the AWD1 flag. Before this value is reached, AWD1 output is not activated.
Analog watchdog with gain and offset compensation
When the gain and offset compensation are enabled, the analog watchdog compares the data after the compensation.
23.4.30 Oversampler
The oversampling unit performs data preprocessing to offload the device. It is able to handle multiple conversions and average them into a single data with increased data width, up to 22 bits.
It provides a result with the following form, where N and M can be adjusted:
It enables the following functions to be performed by hardware: averaging, data rate reduction, SNR improvement and basic filtering.
The oversampling ratio \( N \) is defined by the OVSR[9:0] bits in the ADC_CFGR2 register, or by the JOVSS[3:0] bits in the ADC_CFGR3 register for parallel injected oversampling mode. They can range from 2x to 1024x. The division coefficient \( M \) consists of a right bit shift up to 10 bits. It is defined through the OVSS[3:0] bits of the ADC_CFGR2 register.
The summation unit can yield a result up to 22 bits, which can be left or right shifted at the end. When the right shift is selected, it is rounded to the nearest value using the least significant bits left apart by the shifting, before being finally transferred to the ADC_DR data register.
Figure 210 gives a numerical example of the processing, from a raw 22-bit accumulated data to the final 12-bit result.
Figure 210. 12-bit result oversampling with 10-bit right shift and rounding
![Diagram illustrating the 12-bit result oversampling process with 10-bit right shift and rounding. It shows two examples of 22-bit data being shifted and rounded to 12-bit data based on the OVSS[3:0] register settings.](/RM0487-STM32U3/21400d5f65716bb94959733f1a09fbdc_img.jpg)
The diagram illustrates the processing of 22-bit accumulated data to a 12-bit result using right shifting and rounding. It shows two examples:
- Example 1:
- 22-bit data: OVSR = 1024, bits 31-0. Bit 31 is 0, bits 21-0 are D21..D0. OVSS[3:0]=0.
- Right shifting and rounding: An arrow indicates a 10-bit right shift from bit 21 to bit 11.
- 12-bit data: OVSR = 1024, bits 31-0. Bits 21-12 are 0, bits 11-0 are D11..D0. OVSS[3:0]=1010.
- Example 2:
- 22-bit data: OVSR = 1024, bits 31-0. Bit 31 is 0, bits 21-0 are 0x3FE258. OVSS[3:0]=0.
- Right shifting and rounding: An arrow indicates a 10-bit right shift from bit 23 to bit 13.
- 12-bit data: OVSR = 1024, bits 31-0. Bits 23-12 are 0, bits 11-0 are 0x0FF9. OVSS[3:0]=1010.
MSv66836/V3
Table 198 gives data format for the various N and M combinations, for a raw conversion data equal to 0xFFF.
Table 216. Maximum output results versus N and M
| Over sampling ratio | Max Raw data | No-shift | 1-bit shift | 2-bit shift | 3-bit shift | 4-bit shift | 5-bit shift | 6-bit shift | 7-bit shift | 8-bit shift |
|---|---|---|---|---|---|---|---|---|---|---|
| OVSS = 0000 | OVSS = 0001 | OVSS = 0010 | OVSS = 0011 | OVSS = 0100 | OVSS = 0101 | OVSS = 0110 | OVSS = 0111 | OVSS = 1000 | ||
| x2 | 0x1FFE | 0x1FFE | 0x0FFF | 0x0800 | 0x0400 | 0x0200 | 0x0100 | 0x0080 | 0x0040 | 0x0020 |
| x4 | 0x3FFC | 0x3FFC | 0x1FFE | 0x0FFF | 0x0800 | 0x0400 | 0x0200 | 0x0100 | 0x0080 | 0x0040 |
| x16 | 0xFFF0 | 0xFFF0 | 0x7FF8 | 0x3FFC | 0x1FFE | 0x0FFF | 0x0800 | 0x0400 | 0x0200 | 0x0100 |
| x64 | 0x3FFC0 | 0x3FFC0 | 0x1FFE0 | 0xFFF0 | 0x7FF8 | 0x3FFC | 0x1FFE | 0x0FFF | 0x0800 | 0x0400 |
| x256 | 0xFFF00 | 0xFFF00 | 0x7FF80 | 0x3FFC0 | 0x1FFE0 | 0xFFF0 | 0x7FF8 | 0x3FFC | 0x1FFE | 0x0FFF |
| x1024 | 0x3FFC00 | 0x3FFC00 | 0x1FFE00 | 0xFFF00 | 0x7FF80 | 0x3FFC0 | 0x1FFE0 | 0xFFF0 | 0x7FF8 | 0x3FFC |
The conversion timing rate does not change in oversampling mode: the sample time is maintained equal during the whole oversampling sequence. A new data is provided every N conversion, with an equivalent delay equal to \( N \times T_{\text{CONV}} = N \times (t_{\text{SMP}} + t_{\text{SAR}}) \) . The flags are set as follows:
- • The end of the sampling phase (EOSMP) is set after each sampling phase for regular conversion.
- • The end of conversion (EOC) occurs once every N conversion, when the oversampled result is available.
- • The end of sequence (EOS) occurs once the sequence of oversampled data is completed (that is after a total of N x sequence length conversions).
Unlike the conversion rate, the data latency changes in oversampling mode: each single conversion introduces an additional accumulation. As a result, an additional clock cycle is required when all the conversions are complete, after the accumulation and shift. The EOC flag is set two additional clock cycles after the conversion is complete.
ADC operating modes supported in oversampling mode (single ADC mode)
In oversampling mode, most of the ADC operating modes are maintained:
- • Single, discontinuous, or continuous conversion modes
- • ADC conversions started either by software or triggers
- • ADC stop during a conversion (abort)
- • Data read via CPU or DMA with overrun detection
- • Low-power modes (AUTDLY)
- • Programmable resolution: in this case, the reduced conversion values (as per RES[1:0] bits of the ADC_CFGR1 register) are accumulated, truncated, rounded, and shifted in the same way as 12-bit conversions are.
- • Autoinjected mode (JAUTO) if JOVSPAR = 0 and oversampling ratio is the same for both regular and injected channels.
Analog watchdog
The analog watchdog functionality is maintained, with the following differences:
- • The RES[1:0] bits are ignored and the comparison is always done using the full 23-bit values HTR[22:0] and LTR[22:0].
- • The comparison is performed on the oversampled accumulated value before shifting.
Triggered mode
The oversampling can also be used for basic filtering purpose. Although it not a very powerful filter (slow roll-off and limited stop band attenuation), it can act as a notch filter to reject constant parasitic frequencies (typically coming from the mains or from a switched-mode power supply). For this purpose, a specific discontinuous mode can be enabled through the TROVS bit in ADC_CFGR2, to be able to achieve an oversampling frequency defined by the user and independent from the conversion time itself. The TROVS bit is supported with hardware trigger mode.
Figure 211 shows how conversions are started in response to triggers during discontinuous mode.
If the TROVS bit is set and OVSR \( \neq \) 0, the content of the DISCEN bit is ignored and considered as 1.
If the TROVS bit is set, neither software trigger nor JAUTO is supported.
Figure 211. Triggered regular oversampling mode (TROVS bit = 1)

The diagram illustrates two scenarios for regular oversampling mode. In the top scenario, with CONT=0, DISCEN=1, and TROVS=0, a single trigger initiates a continuous sequence of four conversions: Ch(N) 0 , Ch(N) 1 , Ch(N) 2 , and Ch(N) 3 . The End of Conversion (EOC) flag is set after the final conversion. In the bottom scenario, with CONT=0, DISCEN=1, and TROVS=1, each of the seven triggers initiates a single conversion. The sequence of conversions is Ch(N) 0 , Ch(N) 1 , Ch(N) 2 , Ch(N) 3 , Ch(N) 0 , Ch(N) 1 , and Ch(N) 2 . The EOC flag is set after the seventh conversion.
Injected and regular sequencer management in oversampling mode
In oversampling mode, injected and regular sequencers can have different behaviors. The oversampling can be enabled for both sequencers with some limitations if they have to be used simultaneously (this is related to a unique accumulation unit).
Oversampling regular channels only
The regular oversampling mode ROVSM bit defines how the regular oversampling sequence is resumed if it is interrupted by an injected conversion:
- • In continuous mode (ROVSM = 0), the accumulation restarts from the last valid data (prior to the conversion abort request due to the injected trigger). This ensures that
oversampling is complete whatever the injection frequency (providing at least one regular conversion can be complete between triggers);
- • In resumed mode (ROVSM = 1), the accumulation restarts from 0 (previous conversion results are ignored). This mode guarantees that all the data used for oversampling were converted back-to-back within a single time slot. Care must be taken to have a injection trigger period above the oversampling period length. If this condition is not respected, the oversampling cannot be complete and the regular sequence is blocked.
Figure 212 gives examples for a 4x oversampling ratio.
Figure 212. Regular oversampling modes (4x ratio)

Continued mode: ROVSE = 1, JOVSE = 0, ROVSM = 0, TROVS = 0
Resumed mode: ROVSE = 1, JOVSE = 0, ROVSM = 1, TROVS = 0
MSv34456V2
Oversampling injected channels only
The injected oversampling mode bit JOVSE enables oversampling solely for conversions in the injected sequencer.
Oversampling regular and injected channels
It is possible to have both ROVSE and JOVSE bits set. In this case, the regular oversampling must be resumed (ROVSM bit = 1), as shown in Figure 213 . This limitation no longer applies in parallel injected oversampling mode.
Figure 213. Regular and injected oversampling modes used simultaneously

Regular channels: Ch(N)
0
| Ch(N)
1
| Ch(N)
2
| Ch(N)
3
| Ch(M)
0
| Ch(M)
1
|
Ch(M)
2
|
Ch(M)
3
Injected trigger → Abort
Injected channels: Ch(J) 0 | Ch(J) 1 | Ch(J) 2 | Ch(J) 3 → JEOC
Oversampling aborted
Oversampling resumed: Ch(M) 0 | Ch(M) 1
ROVSE = 1, JOVSE = 1, ROVSM = 1, TROVS = 0
MSv34457V3
Triggered regular oversampling with injected conversions
It is possible to have triggered regular mode with injected conversions. In this case, the injected oversampling mode must be disabled and the ROVSM bit set (the resumed mode is forced). The JOVSE bit must be reset. The behavior is shown in Figure 214 .
Figure 214. Triggered regular oversampling with injection

Regular channels: [Trigger] → Ch(N)
0
| [Trigger] → Ch(N)
1
| [Trigger] → Ch(N)
2
|
Ch(N)
3
|
Ch(N)
4
Injected trigger → Abort
Injected channels: Ch(J) | Ch(K)
Oversampling aborted
Oversampling resumed: [Trigger] → Ch(N) 0 | [Trigger] → Ch(N) 1
ROVSE = 1, JOVSE = 0, ROVSM = 1, TROVS = 1
MSv34458V5
Autoinjection mode
It is possible to oversample autoinjected sequences and store all conversion results in registers. This mode is available only with both regular and injected oversampling active: JAUTO = 1, ROVSE = 1 and JOVSE = 1. Other combinations are not supported. The ROVSM bit is ignored in autoinjection mode. Figure 215 shows how the conversions are sequenced.
Figure 215. Oversampling in autoinjection mode

Combined modes summary
Table 217 summarizes all combinations, including the modes that are not supported.
Table 217. Oversampler operating mode summary
| Regular oversampling ROVSE | Injected oversampling JOVSE | Oversampler mode ROVSM 0 = continued 1 = resumed | Triggered regular mode TROVS | Comment |
|---|---|---|---|---|
| 1 | 0 | 0 | 0 | Regular continued mode |
| 1 | 0 | 0 | 1 | Not supported |
| 1 | 0 | 1 | 0 | Regular resumed mode |
| 1 | 0 | 1 | 1 | Triggered regular resumed mode |
| 1 | 1 | 0 | X | Not supported |
| 1 | 1 | 1 | 0 | Injected and regular resumed mode |
| 1 | 1 | 1 | 1 | Not supported |
| 0 | 1 | X | X | Injected oversampling |
23.4.31 Dual ADC modes
Dual ADC modes can be used in devices with two ADCs or more (see Figure 216).
In dual ADC mode the start of conversion is triggered alternately or simultaneously by the ADC master to the ADC slave, depending on the mode selected by the bits DUAL[4:0] in the ADCC_CCR register.
Four possible modes are implemented:
- • Injected simultaneous mode
- • Regular simultaneous mode
- • Interleaved mode
- • Alternate trigger mode
It is also possible to use these modes combined in the following ways:
- • Injected simultaneous mode + regular simultaneous mode
- • Regular simultaneous mode + alternate trigger mode
- • Injected simultaneous mode + interleaved mode
In dual ADC mode (when the DUAL[4:0] bits in the ADCC_CCR register are not equal to zero), the following bits are shared between the master and slave ADCs, with the slave ADC bits being ignored and always applying to the corresponding bits of the master ADC:
- • ADC_CFGR1 register: DMNGT[2:0], RES[1:0], EXTEN[1:0], OVRMOD, AUTDLY, DISCEN, DISCNUM[2:0], JDISCEN, JAUTO, JDISCEN.
- • ADC_CFGR2 register: ROVSE, JOVSE, TROVS, ROVSM, BULB, SWTRIG, SMPTRIG, OVSR[9:0].
- • ADC_GCOMP register: GCOMP.
- • ADC_CR register: ADSTART, ADSTP, JADSTART, JADSTP.
- • ADC_CFGR1 register: CONT, DISCEN, DISCNUM[2:0].
- • ADC_SQR1 register: LEN (for the regular conversion).
- • ADC_JSQR register: JLEN[1:0], JEXTSEL[4:0], JEXTEN[1:0] (for the injected conversion).
- • ADC_CFGR3 register: JOVSPAR, JOVSE, JOVSIVE, TJOVS, JOVSR[9:0] (for the injected conversion).
For dual mode usage, the sampling time of the master and slave channels must be equal.
To start a conversion in dual mode, the user must program the EXTEN[1:0], EXTSEL, JEXTEN[1:0] and JEXTSEL bits of the master ADC only to configure a software or hardware trigger and a regular or injected trigger. The EXTEN[1:0], JEXTEN[1:0], and JEXTSEL bits of the slave ADC are don't care).
In regular simultaneous or interleaved modes, once the user sets the ADSTART or ADSTP bit of the master ADC, the corresponding bit of the slave ADC is automatically set. However, ADSTART or ADSTP bit of the slave ADC is not necessarily cleared at the same time as the master ADC bit.
In injected simultaneous or alternate trigger modes, once the user sets the JADSTART or JADSTP bit of the master ADC, the corresponding bit of the slave ADC is automatically set. However, JADSTART or JADSTP bit of the slave ADC is not necessarily cleared at the same time as the master ADC bit.
In dual ADC mode, the converted data of the master and slave ADC can be read in parallel, by reading the ADC common data register (ADCC_CDR). The flags can also be read in parallel by reading the dual-mode status register (ADCC_CSR).
Note: In dual mode, BULB, JAUTO, SMPTRIG, and the injected queue are not supported.
Figure 216. Dual ADC block diagram

The diagram illustrates the internal architecture of a Dual ADC system. It is divided into two main sections: the Slave ADC (top) and the Master ADC (bottom), both connected to a common Address/data bus on the right.
- Slave ADC: Receives Internal analog inputs through a multiplexer. It contains Regular channels and Injected channels . The Regular channels output to a Regular data register (32-bits) , and the Injected channels output to Injected data registers (4 x32-bits) . Both registers are connected to the Address/data bus . The Slave ADC also receives Internal triggers from the Master ADC.
- Master ADC: Receives ADCx_IN0 , ADCx_IN2 , and ADCx_INi from GPIO ports through a multiplexer, as well as Internal analog inputs through another multiplexer. It contains Regular channels and Injected channels . The Regular channels output to a Regular data register (32-bits) , and the Injected channels output to Injected data registers (4 x32-bits) . Both registers are connected to the Address/data bus . The Master ADC is controlled by a Dual mode control block and two Start trigger mux. blocks (one for the regular group and one for the injected group).
MSV72687V2
- 1. External triggers also exist on slave ADC but are not shown for the purposes of this diagram.
- 2. The ADC common data register (ADCC_CDR) contains both the master and slave ADC regular converted data.
Injected simultaneous mode with independent regular conversion
The injected simultaneous mode is selected by programming DUAL[4:0] bits to 0b00101.
This mode converts an injected group of channels. The external trigger source comes from the injected group multiplexer of the master ADC (selected by the JEXTSEL bits in the ADC_JSQR register).
Note: Do not convert the same channel on the two ADCs (no overlapping sampling times for the two ADCs when converting the same channel).
In simultaneous mode, the user software must convert sequences with the same length. Sampling times for channels with the same sequence number must be equal.
Regular conversions can be performed on one or all ADCs. In that case, they are independent of each other and are interrupted when an injected event occurs. They are resumed at the end of the injected conversion group.
The software is notified by interrupts when it can read the data:
- • At the end of injected sequence of conversion event (JEOS) on the master ADC, the converted data is stored into the master ADC_JDRy registers and a JEOS interrupt is generated (if enabled)
- • At the end of injected sequence of conversion event (JEOS) on the slave ADC, the converted data is stored into the slave ADC_JDRy registers and a JEOS interrupt is generated (if enabled)
- • If the duration of the master-injected sequence is equal to the duration of the slave injected one (as shown in Figure 217 ), the software can enable only one of the two JEOS interrupts (for example the master JEOS) and read both converted data (from master ADC_JDRy and slave ADC_JDRy registers).
Figure 217. Injected simultaneous mode on four channels: Dual ADC mode

If JDISCEN is set, each simultaneous conversion of the injected sequence requires an injected trigger event to occur.
This mode can be combined with the AUTDLY mode:
- • Once a simultaneous injected sequence of conversions has ended, a new injected trigger event is accepted only if both JEOS bits of the master and the slave ADC have been cleared (delay phase). Any new injected trigger events occurring during the ongoing injected sequence and the associated delay phase are ignored.
- • Once a regular sequence of conversions of the master ADC has ended, a new regular trigger event of the master ADC is accepted only if the master data register (ADC_DR) has been read. Any new regular trigger events occurring for the master ADC during the ongoing regular sequence and the associated delay phases are ignored. There is the same behavior for regular sequences occurring on the slave ADC.
In this mode, the following register bits are shared between the master and slave ADCs:
JADSTART, JADSTP, JDISCEN, JOVSE, JLEN, JEXTEN, JEXTSEL, GCOMPEN, JOVSECT, JOVSISE, JOVSE, and TJOVS.
Regular simultaneous mode with independent injected conversions
The regular simultaneous mode is selected by programming DUAL[4:0] bits to 0b00110.
This mode applies to a regular group of channels. The external trigger source comes from the regular group multiplexer of the master ADC (selected by the EXTSEL bits in the ADC_CFGR1 register). A simultaneous trigger is provided to the slave ADC.
In this mode, independent injected conversions are supported. An injection request (either on the master or on the slave) aborts the current simultaneous conversions both for master and slave. They are restarted once the injected conversion is completed.
Note: Do not convert the same channel on the two ADCs (no overlapping sampling times for the two ADCs when converting the same channel).
In regular simultaneous mode, the user software must convert sequences with the same length. Sampling times for channels with the same sequence number must be equal.
The software is notified by interrupts when it can read the data:
- As the duration of the master regular sequence is equal to the duration of the slave one (as shown in Figure 218 ), the software can enable only one of the two EOC interrupts (for example the master EOC) and read both converted data from the common data register (ADCC_CDR).
The user can read data from either ADCC_CDR or ADCC_CDR2. Once software selects one of these registers, it must continue using the same register until the ADSTP procedure is executed.
The regular data can also be read using the DMA. Several methods are possible:
- Use two DMA channels (one for the master and one for the slave). In this case DAMDF[1:0] bits must be kept cleared:
- Configure the DMA master ADC channel to read ADC_DR from the master. DMA requests are generated at each EOC event of the master ADC.
- Configure the DMA slave ADC channel to read ADC_DR from the slave. DMA requests are generated at each EOC event of the slave ADC.
- Configure the dual ADC mode data format DAMDF[1:0] bits, which leaves one DMA channel free for other uses:
- Set DAMDF[1:0] = 0b10 or 0b11 (depending on resolution).
- A single DMA channel is used (the one corresponding to the master). Configure the DMA master ADC channel to read the common ADC data register (ADCC_CDR or ADCC_CDR2).
- A single DMA request is generated each time both the master and slave EOC events occur. At that moment:
- The slave ADC converted data is available in the upper half-word of the 32-bit ADCC_CDR register
- The master ADC converted data is available in the lower half-word of the ADCC_CDR register.
Alternatively, data can be read from ADCC_CDR2:
- – The first read returns the master ADC data.
- – The second read returns the slave ADC data.
- After these reads, a DMA request is generated. The DMA transfers the slave data from the same data register and handles two transfers for dual mode operation.
- d) Both EOC flags are cleared when the DMA reads the ADCC_CDR register.
Note: When DAMDF[1:0] = 0b10 or 0b11, the user must program the same number of conversions in the master and in the slave sequence. Otherwise, the remaining conversions do not generate a DMA request.
Figure 218. Regular simultaneous mode on 16 channels: dual ADC mode

If the DISCEN bit is set, each “n” simultaneous conversion of the regular sequence require a regular trigger event to occur (“n” is defined by DISCNUM).
This mode can be combined with the AUTDLY mode:
- • Once a simultaneous conversion of the sequence has completed, the next conversion in the sequence starts only after the EOC flag of both the master and the slave are cleared.
- • Once a simultaneous regular sequence of conversions has completed, a new regular trigger event is accepted only after the EOC flag of both the master and the slave are cleared. Any new regular trigger events occurring during the ongoing regular sequence and the associated delay phases are ignored.
The DMA can be used to handle data in regular simultaneous mode combined with AUTDLY mode, assuming that multi-DMA mode is used: bits DAMDF must be set to 0b10 or 0b11.
Interleaved mode with independent injected conversions
This mode is selected by programming DUAL[4:0] bits to 0b00111.
It can be started only on a regular group (usually one channel). The external trigger source comes from the regular channel multiplexer of the master ADC.
After an external trigger occurs:
- • The master ADC starts immediately,
- • The slave ADC starts after a delay of several ADC clock cycles after the sampling phase of the master ADC has completed (during the master ADC conversion period).
The minimum delay between two conversions in interleaved mode is configured in the DELAY bits in the ADCC_CCR register (see Table DELAY bits versus ADC resolution ). This delay starts counting one half cycle after the end of the sampling phase of the master
conversion. This way, an ADC cannot start a conversion if the complementary ADC is still sampling its input (only one ADC can sample the input signal at a given time).
- • The minimum possible DELAY is 1 to ensure that there is at least one cycle time between the opening of the analog switch of the master ADC sampling phase and the closing of the analog switch of the slave ADC sampling phase.
- • The maximum DELAY is equal to the number of cycles corresponding to the selected resolution. However, the user must properly calculate this delay to ensure that an ADC does not start a conversion while the other ADC is still sampling its input.
As the CONT bit is set on both the master and slave ADCs, the selected regular channels of both ADCs are continuously converted.
The software is notified by interrupts when it can read the data at the end of each conversion event (EOC) on the master or slave ADC. A slave and master EOC interrupts are generated (if EOCIE is enabled) and the software can read the ADC_DR of the slave/master ADC.
Table 218. DELAY bits versus ADC resolution (1)
| DELAY bits | 12-bit resolution | 10-bit resolution | 8-bit resolution | 6-bit resolution |
|---|---|---|---|---|
| 0000 | 1 * T adc_ker_ck | 1 * T adc_ker_ck | 1 * T adc_ker_ck | 1 * T adc_ker_ck |
| 0001 | 2 * T adc_ker_ck | 2 * T adc_ker_ck | 2 * T adc_ker_ck | 2 * T adc_ker_ck |
| 0010 | 3 * T adc_ker_ck | 3 * T adc_ker_ck | 3 * T adc_ker_ck | 3 * T adc_ker_ck |
| 0011 | 4 * T adc_ker_ck | 4 * T adc_ker_ck | 4 * T adc_ker_ck | 4 * T adc_ker_ck |
| 0100 | 5 * T adc_ker_ck | 5 * T adc_ker_ck | 5 * T adc_ker_ck | 5 * T adc_ker_ck |
| 0101 | 6 * T adc_ker_ck | 6 * T adc_ker_ck | 6 * T adc_ker_ck | 6 * T adc_ker_ck |
| 0110 | 7 * T adc_ker_ck | 7 * T adc_ker_ck | 7 * T adc_ker_ck | 6 * T adc_ker_ck |
| 0111 | 8 * T adc_ker_ck | 8 * T adc_ker_ck | 8 * T adc_ker_ck | 6 * T adc_ker_ck |
| 1000 | 9 * T adc_ker_ck | 9 * T adc_ker_ck | 8 * T adc_ker_ck | 6 * T adc_ker_ck |
| 1001 | 10 * T adc_ker_ck | 10 * T adc_ker_ck | 8 * T adc_ker_ck | 6 * T adc_ker_ck |
| 1010 | 11 * T adc_ker_ck | 10 * T adc_ker_ck | 8 * T adc_ker_ck | 6 * T adc_ker_ck |
| 1011 | 12 * T adc_ker_ck | 10 * T adc_ker_ck | 8 * T adc_ker_ck | 6 * T adc_ker_ck |
| 1100 | 12 * T adc_ker_ck | 10 * T adc_ker_ck | 8 * T adc_ker_ck | 6 * T adc_ker_ck |
| others | 12 * T adc_ker_ck | 10 * T adc_ker_ck | 8 * T adc_ker_ck | 6 * T adc_ker_ck |
1. Preliminary information, subject to change.
Figure 219. Interleaved mode on 1 channel in continuous conversion mode: Dual ADC mode

Figure 220. Interleaved mode on 1 channel in single conversion mode: Dual ADC mode

If the DISCEN bit is set, each “ n ” simultaneous conversion (“ n ” is defined by DISCNUM) of the regular sequence require a regular trigger event to occur.
In interleaved mode, injected conversions are supported. When injection is done (either on master or slave), both master and the slave regular conversions are aborted and the sequence is restarted from the master (see Figure 221 ).
Note: In interleaved mode, the ADCx_AWDy_OUT signal for the master ADC is synchronized with the EOC of the master ADC, but the interrupt flag is synchronized with the EOC/JEOC flag of the slave ADC.
In addition, the ROVSM = 0 setting is not supported in oversampling mode.
Figure 221. Interleaved conversion with injection

Alternate trigger mode with independent regular conversions
The alternate trigger mode is selected by programming DUAL[4:0] bits to 0b01001.
This mode can only be started on an injected group. The source of the external trigger comes from the multiplexer injected group of the master ADC.
This mode is only possible when selecting hardware triggers: JEXTEN[1:0] must not be 0x0.
Injected discontinuous mode disabled (JDISCEN = 0)
- 1. When the first trigger occurs, all injected master ADC channels in the group are converted.
- 2. When the second trigger occurs, all injected slave ADC channels in the group are converted.
- 3. And so on...
A JEOS interrupt, if enabled, is generated after all injected channels of the master ADC in the group have been converted.
A JEOS interrupt, if enabled, is generated after all injected channels of the slave ADC in the group have been converted.
JE0C interrupts, if enabled, can also be generated after each injected conversion.
Figure 222. Alternate trigger: injected group of each ADC

The diagram illustrates the timing of injected conversions for a Master ADC and a Slave ADC. It shows four trigger events and the resulting conversion sequence. A legend indicates that a shaded rectangle represents 'Sampling' and a white rectangle represents 'Conversion'.
- 1st trigger: Initiates the first injected channel of the Master ADC.
- 2nd trigger: Initiates the first injected channel of the Slave ADC.
- 3rd trigger: Initiates the second injected channel of the Master ADC.
- 4th trigger: Initiates the second injected channel of the Slave ADC.
Interrupt signals are generated as follows:
- JEOC on master ADC: Generated after the completion of each injected channel on the Master ADC.
- JEOC on slave ADC: Generated after the completion of each injected channel on the Slave ADC.
- JEOS on master ADC: Generated after the completion of all injected channels on the Master ADC.
- JEOS on slave ADC: Generated after the completion of all injected channels on the Slave ADC.
ai16059-m
Note: Regular conversions can be enabled on one or all ADCs. In this case, the regular conversions are independent of each other. A regular conversion is interrupted when the ADC has to perform an injected conversion. It is resumed when the injected conversion is finished.
The time interval between two trigger events must be greater than or equal to one ADC clock period. The minimum time interval between two trigger events that start conversions on the same ADC is the same as in the single ADC mode.
Injected discontinuous mode enabled (JDISCEN = 1)
If the injected discontinuous mode is enabled for both master and slave ADCs:
- 1. When the first trigger occurs, the first injected channel of the master ADC is converted.
- 2. When the second trigger occurs, the first injected channel of the slave ADC is converted.
- 3. And so on...
A JEOS interrupt, if enabled, is generated after all injected channels of the master ADC in the group have been converted.
A JEOS interrupt, if enabled, is generated after all injected channels of the slave ADC in the group have been converted.
JEOC interrupts, if enabled, can also be generated after each injected conversion.
Figure 223. Alternate trigger: 4 injected channels (each ADC) in discontinuous mode

Legend:
[Grey box] Sampling
[White box] Conversion
ai16060V3
Combined regular/injected simultaneous mode
This mode is selected by programming DUAL[4:0] bits to 0b00001.
The simultaneous conversion of a regular group can be interrupted to start the simultaneous conversion of an injected group.
Note: In combined regular/injected simultaneous mode, the user software must convert sequences with the same length.
Combined regular simultaneous and alternate trigger mode
This mode is selected by programming DUAL[4:0] bits to 0b00010.
The simultaneous conversion of a regular group can be interrupted to start the alternate trigger conversion of an injected group. Figure 224 shows the behavior of an alternate trigger interrupting a simultaneous regular conversion.
The injected alternate conversion immediately starts after the injected event. If a regular conversion is already running, in order to ensure synchronization after the injected conversion, the regular conversion of all (master/slave) ADCs is stopped and resumed synchronously at the end of the injected conversion.
Note: In combined regular simultaneous + alternate trigger mode, the user software must convert sequences with the same length.
The software trigger is not supported for injected conversions.
Figure 224. Alternate + regular simultaneous

ai16062V4
If a trigger occurs during an injected conversion that has interrupted a regular conversion, the alternate trigger is served. Figure 225 shows the behavior in this case (note that the sixth trigger is ignored because the associated alternate conversion is not complete).
Figure 225. Case of trigger occurring during injected conversion

Combined injected simultaneous and interleaved mode
This mode is selected by programming DUAL[4:0] bits to 0b00011.
An interleaved conversion can be interrupted with a simultaneous injected event.
In this case, the interleaved conversion is immediately interrupted and the simultaneous injected conversion starts. At the end of the injected sequence, the interleaved conversion is resumed. When the interleaved regular conversion resumes, the first regular conversion which is performed is always the master's one. Figure 226, Figure 227, and Figure 228 show examples of this behavior.
Note: In this mode, the ROVSM = 0 setting is not supported in oversampling mode.
Figure 226. Interleaved single channel CH0 with injected sequence CH11, CH12

Figure 227. Two interleaved channels (CH1, CH2) with injected sequence CH11, CH12
- case 1: Master interrupted first

ADC1 (master) sequence: CH1 (Sampling) → CH1 (Conversion) → CH1 (Sampling) → CH1 (Conversion) → CH1 (Sampling) → CH1 (Conversion).
ADC2 (slave) sequence: CH2 (Sampling) → CH2 (Conversion) → CH2 (Sampling) → CH2 (Conversion) → CH2 (Sampling) → CH2 (Conversion).
Injected sequence: CH11 (Sampling) → CH11 (Conversion) → CH12 (Sampling) → CH12 (Conversion).
Legend: Sampling (light gray), Conversion (dark gray).
Annotations: 'read CDR' for completed conversions, 'Conversions aborted' for the slave's CH2 conversion when the injected sequence starts, 'Injected trigger' for the start of the injected sequence, 'Resume (always restart with the master)' for the resumption of the slave's sequence.
MS34462V1
Figure 228. Two interleaved channels (CH1, CH2) with injected sequence CH11, CH12
- case 2: Slave interrupted first

ADC1 (master) sequence: CH1 (Sampling) → CH1 (Conversion) → CH1 (Sampling) → CH1 (Conversion) → CH1 (Sampling) → CH1 (Conversion).
ADC2 (slave) sequence: CH2 (Sampling) → CH2 (Conversion) → CH2 (Sampling) → CH2 (Conversion) → CH2 (Sampling) → CH2 (Conversion).
Injected sequence: CH11 (Sampling) → CH11 (Conversion) → CH12 (Sampling) → CH12 (Conversion).
Legend: Sampling (light gray), Conversion (dark gray).
Annotations: 'read CDR' for completed conversions, 'Conversions aborted' for the master's CH1 conversion when the injected sequence starts, 'Injected trigger' for the start of the injected sequence, 'Resume (always restart with the master)' for the resumption of the master's sequence.
MS34463V2
DMA requests in dual ADC mode
In all dual ADC modes, it is possible to use two DMA channels (one for the master, one for the slave) to transfer the data, like in single mode (refer to Figure 229: DMA requests in regular simultaneous mode when DAMDF[1:0] = 0b00 ).
Figure 229. DMA requests in regular simultaneous mode when DAMDF[1:0] = 0b00

Configuration where each sequence contains only one conversion. Master and slave timings are equal.
MSV31032V3
In interleaved mode or in simultaneous regular mode, it is also possible to save one DMA channel and transfer both data using a single DMA channel. To do this, the DAMDF[1:0] bits must be configured in the ADCC_CCR register:
- • DAMDF[1:0] = 0b10, 32-bit format:
A DMA request is generated alternatively after the master and slave EOC events have occurred. At that time, the data are alternatively available in the 32-bit register ADCC_CDR2 32-bit register.
This mode is used when the data width is above 16 bits (conversion data width can exceed 16 bits when functions such as oversampling, compensation and left-bit shift, are used).
Behavior: A DMA request is generated each time a new 32-bit data is available:
- – First DMA request: ADCC_CDR2[31:0] = MST_ADC_DR[31:0]
- – Second DMA request: ADCC_CDR2[31:0] = SLV_ADC_DR[31:0]
- • DAMDF[1:0] = 0b10, 16-bit format:
A DMA request is generated alternatively after the master and slave EOC events have occurred. At that time, two data items are available and the 32-bit register ADCC_CDR contains the two half-words representing two ADC-converted data. The slave ADC data takes the upper half-word and the master ADC data takes the lower half-word. DMA transfers two data by one request.
Any value above 16-bit in the master or the slave-converted data is truncated to the least 16 significant bits.
Behavior: A DMA request is generated each time a new 32-bit data is available:
- – First DMA request:
\( ADCC\_CDR[31:0] = (SLV\_ADC\_DR[15:0] \ll 16) | MST\_ADC\_DR[15:0] \) - – Second DMA request:
\( ADCC\_CDR[31:0] = SLV\_ADC\_DR[15:0] | MST\_ADC\_DR[15:0] \)
Figure 230. DMA requests in interleaved mode when DAMDF = 0b10

sequenceDiagram
Note over Trigger, DMA Slave: Configuration where each sequence contains only one conversion
Trigger->>ADC Master: CH1 Start
ADC Master->>ADC Master EOC: Pulse at end of CH1
ADC Master EOC->>ADC Slave: Start CH2 after Delay
ADC Slave->>ADC Slave EOC: Pulse at end of CH2
ADC Slave EOC->>DMA Master: Trigger DMA Request
Configuration where each sequence contains only one conversion
MSv31034V2
Note: When using dual ADC mode, the user must take care to configure properly the duration of the master and slave conversions so that a DMA request is generated and served for reading both data (master + slave) before a new conversion data is available.
- • DAMDF[1:0] = 0b11:
This mode is similar to the DAMDF[1:0] = 0b10 configuration. The only difference is that on each DMA request (two data are available), two bytes representing two ADC converted data are transferred as a half-word.
This mode is used when the resolution is 6 bits or 8 bits and data are not signed.
Behavior: A DMA request is generated each time two data items are available:
- – First DMA request:
\( ADCC\_CDR[15:0] = (SLV\_ADC\_DR[7:0] \ll 8) | MST\_ADC\_DR[7:0] \) - – Second DMA request:
\( ADCC\_CDR[15:0] = SLV\_ADC\_DR[7:0] | MST\_ADC\_DR[7:0] \)
Note: DMA burst mode is not supported in ADC dual mode.
Overrun detection when OVRMOD = 0
In dual ADC mode (when DUAL[4:0] is not equal to b00000), if an overrun is detected on one of the ADCs, DMA requests are no longer issued to ensure that all the data transferred to the RAM are valid (this behavior occurs whatever the DAMDF configuration). The EOC bit
corresponding to one ADC might remain set because the data register of this ADC contains valid data.
Overrun detection when OVRMOD = 1
In dual ADC mode, if an overrun occurs on either ADC, the data register is overwritten, causing continuous DMA requests. This results in loss of data coherency.
DMA one-shot mode/ DMA circular mode when multi-ADC mode is selected
When DAMDF mode is selected (0b10 or 0b11), DMNGT[1:0] bits of the ADCC_CCR register must also be configured to select between DMA one-shot mode and circular mode, as explained in section Section : Managing conversions using the DMA
Stopping the conversions in dual ADC modes
In dual ADC mode, the user software must set the ADSTP/JADSTP control bits in the master ADC to stop the conversions of both ADC. The other ADSTP control bit on the slave ADC has no effect in dual ADC mode.
Once both ADCs are effectively stopped, the ADSTART/JADSTART bits on the master and slave ADCs are both deasserted by hardware.
Analog watchdog in dual mode
The analog watchdog is supported in all dual modes.
Disabling the ADC in dual mode
During a dual-mode operation, the master ADC shares the ADC clock with the slave ADC. To disable the ADC correctly through the ADDIS bit of ADC_CR, set the ADSTP (or JADSP) bit on the master ADC. Once ADSTP (or JADSTP) becomes 0 both for the master and slave ADCs, set the ADDIS bit on the master ADC, then set the ADDIS bit on the slave ADC.
Autoinjection mode in dual mode
Autoinjection mode is not supported when DUAL[4:0] equals 0b00010, 0b00011, 0b00101, 0b00110, 0b00111, or 0b01001.
Additionally, parallel injected oversampling mode is not supported in autoinjection mode.
ADF mode in dual ADC interleaved mode
In dual ADC interleaved modes (DUAL[4:0] = 0b00011 or DUAL[4:0] = 0b00111), the ADC conversion results can be transferred directly to the ADF.
This mode is enabled by setting DMNGT[1:0] bits to 0b10 in the master ADC ADC_CFGR1 register.
The ADC transfers alternatively the 16 least significant bits of the regular data register from the master and the slave converter to a single channel of the ADF. Each transfer resets the EOC flag of each channel once the transfer is complete.
The data format must be 16-bit signed:
ADC_DR[15:12] = Sign extended
ADC_DR[11] = Sign
ADC_DR[10:0] = Data
To obtain 16-bit signed format, the software must configure OFFSET[11:0] bits to 0x800 with OFFSETy_CH[4:0] selecting the target channel set.
Only right aligned data can be set as ADF input format (see Figure 195: Right alignment (offset enabled, signed value) ).
ADF mode in dual ADC simultaneous mode
It is not mandatory to use the ADF in dual ADC simultaneous mode since conversion data are handled by each individual channel. Single mode with same trigger source results in simultaneous conversion with ADF interface.
Dual ADC modes supported in oversampling mode
It is possible to have oversampling enabled when working in dual ADC configuration. In this case, the two ADCs must be programmed with the very same settings (including oversampling).
23.4.32 Temperature sensor
The temperature sensor can be used to measure the junction temperature ( \( T_J \) ) of the device.
The temperature sensor is internally connected to the ADC input channels, which are used to convert the sensor output voltage to a digital value (see Table: ADC interconnection in Section 23.4.2: ADC pins and internal signals for more details). When not in use, the sensor can be put in power-down mode. It supports the temperature range specified in the product datasheet.
Figure 231 shows the block diagram of connections between the temperature sensor and the ADC.
The temperature sensor output voltage changes linearly with temperature. The offset of this line varies from chip to chip due to process variation (up to 45 °C from one chip to another).
The uncalibrated internal temperature sensor is more suited for applications that detect temperature variations instead of absolute temperatures. To improve the accuracy of the temperature sensor measurement, calibration values are stored in system memory for each device by ST during production.
During the manufacturing process, the calibration data of the temperature sensor and the internal voltage reference are stored in the system memory area. The user application can then read them and use them to improve the accuracy of the temperature sensor or the internal reference (refer to the datasheet for additional information).
The temperature sensor is internally connected to the ADC input channel, which is used to convert the sensor's output voltage to a digital value. Refer to the electrical characteristics section of the device datasheet for the sampling time value to be applied when converting the internal temperature sensor.
When not in use, the sensor can be put in power-down mode.
Figure 231 shows the block diagram of the temperature sensor.
Figure 231. Temperature sensor channel block diagram

Reading the temperature
To use the sensor:
- 1. Select the ADC input channel that is connected to \( V_{\text{SENSE}} \) .
- 2. Program with the appropriate sampling time (refer to the electrical characteristics section of the device datasheet).
- 3. Set the TSEN bit in the ADCC_CCR register to wake up the temperature sensor from power-down mode.
- 4. Start the ADC conversion.
- 5. Read the resulting \( V_{\text{SENSE}} \) data in the ADC data register.
- 6. Calculate the actual temperature using the following formula:
Where:
- • TS_CAL2 is the temperature sensor calibration value acquired at TS_CAL2_TEMP.
- • TS_CAL1 is the temperature sensor calibration value acquired at TS_CAL1_TEMP.
- • TS_DATA is the actual temperature sensor output value converted by ADC.
Refer to the device datasheet for more information about TS_CAL1 and TS_CAL2 calibration points.
Caution: The above formula is valid only if the \( V_{REF+} \) condition specified in the table Temperature sensor calibration values of the datasheet are respected.
Note: The sensor has a startup time after waking from power-down mode before it can output \( V_{SENSE} \) at the correct level. The ADC also has a startup time after power-on, so to minimize the delay, the ADEN, and TSEN bits must be set simultaneously.
23.4.33 \( V_{BAT} \) supply monitoring
The VBATEN bit in the ADCC_CCR register is used to switch to the battery voltage. As the \( V_{BAT} \) voltage can be higher than \( V_{DDA} \) , to ensure the correct operation of the ADC, the \( V_{BAT} \) pin is internally connected to a bridge divider by 4. This bridge is automatically enabled when VBATEN is set, to connect \( V_{BAT}/4 \) to the ADC input channels (see Table: ADC interconnection in Section 23.4.2: ADC pins and internal signals for more details). As a consequence, the converted digital value is one fourth of the \( V_{BAT} \) voltage. To prevent any unwanted consumption on the battery, it is recommended to enable the bridge divider only when needed, for ADC conversion.
Refer to the electrical characteristics of the device datasheet for the sampling time value to be applied when converting the \( V_{BAT}/4 \) voltage.
Figure 232 shows the block diagram of the \( V_{BAT} \) sensing feature.
Figure 232. \( V_{BAT} \) channel block diagram

The diagram illustrates the internal circuitry for \( V_{BAT} \) monitoring. On the left, the \( V_{BAT} \) pin is connected to a switch. This switch is controlled by the VBATEN control bit. When the switch is closed, it connects the \( V_{BAT} \) pin to a bridge divider consisting of two resistors. The output of this divider is labeled \( V_{BAT}/4 \) . This \( V_{BAT}/4 \) signal is then connected to an ADC input through a multiplexer. The ADC is represented by a block labeled ADCx, which is further connected to an Address/data bus. The switch symbol includes a small circle at the common terminal, indicating it is a SPDT (Single Pole Double Throw) switch.
- 1. The VBATEN bit must be set to enable the conversion of internal channel for \( V_{BAT}/4 \) .
23.4.34 Monitoring the internal voltage reference
It is possible to monitor the internal voltage reference ( \( V_{REFINT} \) ) to have a reference point for evaluating the ADC \( V_{REF+} \) voltage level.
Refer to the ADC interconnection table in Section 23.4.2: ADC pins and internal signals for details on the ADC input channels to which the internal voltage reference is internally connected.
Refer to the electrical characteristics section of the device datasheet for the sampling time value to be applied when converting the internal voltage reference voltage.
Figure 233 shows the block diagram of the \( V_{REFINT} \) sensing feature.
Figure 233. \( V_{REFINT} \) channel block diagram

- 1. The VREFEN bit of the ADCC_CCR register must be set to enable the conversion of internal channels ( \( V_{REFINT} \) ).
Calculating the actual \( V_{REF+} \) voltage using the internal reference voltage
The power supply voltage applied to the device may be subject to variations or not precisely known. When \( V_{DDA} \) is connected to \( V_{REF+} \) , it is possible to compute the actual \( V_{DDA} \) voltage using the embedded internal reference voltage ( \( V_{REFINT} \) ). \( V_{REFINT} \) and its calibration data acquired by the ADC during the manufacturing process at \( V_{REF+} \) can be used to evaluate the actual \( V_{DDA} \) voltage level.
The following formula gives the actual \( V_{REF+} \) voltage supplying the device:
Where:
- • \( V_{REF+\_Charac} \) is the value of \( V_{REF+} \) voltage characterized at \( V_{REFINT} \) during the manufacturing process. It is specified in the device datasheet.
- • \( VREFINT\_CAL \) is the \( VREFINT \) calibration value.
- • \( VREFINT\_DATA \) is the actual \( VREFINT \) output value converted by ADC.
Converting a supply-relative ADC measurement to an absolute voltage value
The ADC is designed to deliver a digital value corresponding to the ratio between \( V_{REF+} \) and the voltage applied on the converted channel.
For some applications, the \( V_{REF+} \) value is unknown and ADC converted values are right-aligned. In this case, it is necessary to convert this ratio into a voltage independent from \( V_{REF+} \) :
By replacing \( V_{REF+} \) by the formula provided above, the absolute voltage value is given by the following formula
For applications where \( V_{REF+} \) is known and ADC converted values are right-aligned, the absolute voltage value can be obtained by using the following formula:
Where:
- – VREFINT_CAL is the VREFINT calibration value.
- – ADC_DATA is the value measured by the ADC on channel x (right-aligned).
- – VREFINT_DATA is the actual VREFINT output value converted by the ADC.
- – FULL_SCALE is the maximum digital value of the ADC output. For example with 12-bit resolution, we obtain \( 2^{12} - 1 = 4095 \) , or \( 2^8 - 1 = 255 \) with 8-bit resolution.
Note: If ADC measurements are done using an output format other than 12-bit right-aligned, all the parameters must first be converted to a compatible format before the calculation is done.
23.4.35 Monitoring the DAC output voltage
The ADC is connected to a DAC internal channel. To measure the DAC output voltage, enable the DAC internal channel through DAC registers.
23.4.36 Monitoring the supply voltage
The ADCs are connected to the internal supply voltage. To use the ADC to measure this voltage, select the input channel by setting SQx or JSQx bits.
23.5 ADC in low-power modes
Table 219. Effect of low-power modes on the ADC
| Mode | Description |
|---|---|
| Sleep | No effect. DMA requests are functional. ADC interrupts cause the device to exit from Sleep mode. |
| Stop 0/1/2/3 | The ADC is no more functional. The ADC must be powered down before entering Stop mode. The content of the ADC registers is kept. |
| Standby/Shutdown | The ADC is powered down and must be reinitialized after exiting Standby or Shutdown mode. |
23.6 ADC interrupts
For each ADC, an interrupt can be generated:
- • After ADC power-up, when the ADC is ready (ADRDY flag)
- • On the end of any conversion for regular groups (EOC flag)
- • On the end of a sequence of conversion for regular groups (EOS flag)
- • On the end of any conversion for injected groups (JEOC flag)
- • On the end of a sequence of conversion for injected groups (JEOS flag)
- • When an analog watchdog detection occurs (AWD1, AWD2 and AWD3 flags)
- • When the end of the sampling phase occurs (EOSMP flag)
- • When the data overrun occurs (OVR flag)
- • When the ADC internal voltage regulator output is ready (LDORDY flag)
- • When the injected sequence context queue overflows (JQOVF flag)
Separate interrupt enable bits are available for flexibility.
Note: Interrupts are generated by the AHB clock domain. Since the ADC clock is
adc_ker_ck
, interrupt flags are delayed due to the synchronization between
adc_ker_ck
and AHB clock domains.
Table 220. ADC interrupts
| Interrupt vector | Interrupt event | Event flag | Enable Control bit | Interrupt clear method | Exit from Sleep mode | Exit from Stop, Standby mode |
|---|---|---|---|---|---|---|
| ADC | ADC ready | ADRDY | ADRDYIE | Set by hardware and cleared by software | Yes | No |
| End of conversion of a regular group | EOC | EOCIE | ||||
| End of conversion sequence of a regular group | EOS | EOSIE | ||||
| End of conversion of an injected group | JEOC | JEOCIE | ||||
| End of conversion sequence of an injected group | JEOS | JEOSIE | ||||
| Analog watchdog 1 flag is set | AWD1 | AWD1IE | ||||
| Analog watchdog 2 flag is set | AWD2 | AWD2IE | ||||
| Analog watchdog 3 flag is set | AWD3 | AWD3IE | ||||
| End of sampling phase | EOSMP | EOSMPIE | ||||
| Overrun | OVR | OVRIE | ||||
| ADC internal voltage regulator ready | LDORDY | LDORDYIE | ||||
| Injected context queue overflows | JQOVF | JQOVFIE |
23.7 ADC registers (for each ADC)
Refer to Section 1.2 for a list of abbreviations used in register descriptions.
23.7.1 ADC interrupt and status register (ADC_ISR)
Address offset: 0x000
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | LDORDY | Res. | JQOVF | AWD3 | AWD2 | AWD1 | JEOS | JEOC | OVR | EOS | EOC | EOSMP | ADRDY |
| rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | rc_w1 | ||||
Bits 31:13 Reserved, must be kept at reset value.
Bit 12 LDORDY : ADC internal voltage regulator output ready flag
This bit is set by hardware and cleared by software. It indicates that the ADC internal voltage regulator output is ready and that the ADC can be enabled or calibrated.
0: ADC LDO internal voltage regulator disabled
1: ADC LDO internal voltage regulator enabled
Bit 11 Reserved, must be kept at reset value.
Bit 10 JQOVF : Injected context queue overflow
This bit is set by hardware when an overflow of the injected queue of context occurs. It is cleared by software writing 1 to it or when ADEN = 0.
Refer to Section 23.4.21: Queue of context for injected conversions for more information.
0: No injected context queue overflow occurred (or the flag event was already acknowledged and cleared by software)
1: Injected context queue overflow has occurred
Bit 9 AWD3 : Analog watchdog 3 flag
This bit is set by hardware when the converted voltage crosses the values programmed in the fields LTR[22:0] and HTR[22:0] of ADC_AWD3LTR and ADC_AWD3HTR registers. It is cleared by software writing 1 to it or when ADEN = 0.
0: No analog watchdog 3 event occurred (or the flag event was already acknowledged and cleared by software)
1: Analog watchdog 3 event occurred
Bit 8 AWD2 : Analog watchdog 2 flag
This bit is set by hardware when the converted voltage crosses the values programmed in the fields LTR[22:0] and HTR[22:0] of ADC_AWD2LTR and ADC_AWD2HTR registers. It is cleared by software writing 1 to it or when ADEN = 0.
0: No analog watchdog 2 event occurred (or the flag event was already acknowledged and cleared by software)
1: Analog watchdog 2 event occurred
Bit 7 AWD1 : Analog watchdog 1 flag
This bit is set by hardware when the converted voltage crosses the values programmed in the fields LTR[22:0] and HTR[22:0] of ADC_AWD1LTR and ADC_AWD1HTR registers. It is cleared by software writing 1 to it or when ADEN = 0.
0: No analog watchdog 1 event occurred (or the flag event was already acknowledged and cleared by software)
1: Analog watchdog 1 event occurred
Bit 6 JEOS : Injected channel end of sequence flag
This bit is set by hardware at the end of the conversions of all injected channels in the group. It is cleared by software writing 1 to it or when ADEN = 0.
0: Injected conversion sequence not complete (or the flag event was already acknowledged and cleared by software)
1: Injected conversions complete
Bit 5 JEOC : Injected channel end of conversion flag
This bit is set by hardware at the end of each injected conversion of a channel when a new data is available in the corresponding ADC_JDRy register. It is cleared by software writing 1 to it, when ADEN = 0, or by reading the corresponding ADC_JDRy register.
0: Injected channel conversion not complete (or the flag event was already acknowledged and cleared by software)
1: Injected channel conversion complete
Bit 4 OVR: ADC overrunThis bit is set by hardware when an overrun occurs on a regular channel (a new conversion has completed while the EOC flag was already set) or when adc_hclk clock is too slow to manage the data.
It is cleared by software writing 1 to it or when ADEN = 0.
0: No overrun occurred (or the flag event was already acknowledged and cleared by software)
1: Overrun has occurred
Bit 3 EOS: End of regular sequence flagThis bit is set by hardware at the end of the conversions of a regular sequence of channels. It is cleared by software writing 1 to it or when ADEN = 0.
0: Regular conversions sequence not complete (or the flag event was already acknowledged and cleared by software)
1: Regular conversions sequence complete
Bit 2 EOC: End of conversion flagThis bit is set by hardware at the end of each regular conversion of a channel when a new data is available in the ADC_DR register. It is cleared by software writing 1 to it, when ADEN = 0, or by reading the ADC_DR register.
0: Regular channel conversion not complete (or the flag event was already acknowledged and cleared by software)
1: Regular channel conversion complete
Bit 1 EOSMP: End of sampling flagThis bit is set by hardware during the conversion of any channel (only for regular channels), at the end of the sampling phase. It is cleared by software writing 1 or when ADEN = 0.
0: not at the end of the sampling phase (or the flag event was already acknowledged and cleared by software)
1: End of sampling phase reached
Bit 0 ADDRDY: ADC readyThis bit is set by hardware after the ADC has been enabled (bit ADEN = 1) and when the ADC reaches a state where it is ready to accept conversion requests.
It is cleared by software writing 1 to it or when ADEN = 0.
0: ADC not yet ready to start conversion (or the flag event was already acknowledged and cleared by software)
1: ADC is ready to start conversion
23.7.2 ADC interrupt enable register (ADC_IER)
Address offset: 0x004
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | LDORDYIE | Res. | JQOVFIE | AWD3IE | AWD2IE | AWD1IE | JEOSIE | JEOCIE | OVRIE | EOSIE | EOCIE | EOSPIE | ADRDYIE |
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:13 Reserved, must be kept at reset value.
Bit 12 LDORDYIE : ADC internal voltage regulator interrupt enable
This bit is set and cleared by software to enable/disable the ADC internal voltage regulator interrupt.
0: Internal voltage regulator interrupt disabled
1: Internal voltage regulator interrupt enabled
Note: The software is allowed to write this bit only when ADEN = 0.
Bit 11 Reserved, must be kept at reset value.
Bit 10 JQOVFIE : Injected context queue overflow interrupt enable
This bit is set and cleared by software to enable/disable the injected context queue overflow interrupt.
0: Injected context queue overflow interrupt disabled
1: Injected context queue overflow interrupt enabled. An interrupt is generated when the JQOVF bit is set.
Note: The software is allowed to write this bit only when JADSTART = 0 (which ensures that no injected conversion is ongoing).
Bit 9 AWD3IE : Analog watchdog 3 interrupt enable
This bit is set and cleared by software to enable/disable the analog watchdog 2 interrupt.
0: Analog watchdog 3 interrupt disabled
1: Analog watchdog 3 interrupt enabled
Note: The software is allowed to write this bit only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Bit 8 AWD2IE : Analog watchdog 2 interrupt enable
This bit is set and cleared by software to enable/disable the analog watchdog 2 interrupt.
0: Analog watchdog 2 interrupt disabled
1: Analog watchdog 2 interrupt enabled
Note: The software is allowed to write this bit only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Bit 7 AWD1IE : Analog watchdog 1 interrupt enable
This bit is set and cleared by software to enable/disable the analog watchdog 1 interrupt.
0: Analog watchdog 1 interrupt disabled
1: Analog watchdog 1 interrupt enabled
Note: The software is allowed to write this bit only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Bit 6 JEOSIE: End of injected sequence of conversions interrupt enableThis bit is set and cleared by software to enable/disable the end of injected sequence of conversions interrupt.
0: JEOS interrupt disabled
1: JEOS interrupt enabled. An interrupt is generated when the JEOS bit is set.
Note: The software is allowed to write this bit only when JADSTART = 0 (which ensures that no injected conversion is ongoing).
Bit 5 JEOCIE: End of injected conversion interrupt enableThis bit is set and cleared by software to enable/disable the end of an injected conversion interrupt.
0: JEOC interrupt disabled.
1: JEOC interrupt enabled. An interrupt is generated when the JEOC bit is set.
Note: The software is allowed to write this bit only when JADSTART = 0 (which ensures that no injected conversion is ongoing).
Bit 4 OVRIE: Overrun interrupt enableThis bit is set and cleared by software to enable/disable the Overrun interrupt of a regular conversion.
0: Overrun interrupt disabled
1: Overrun interrupt enabled. An interrupt is generated when the OVR bit is set.
Note: The software is allowed to write this bit only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bit 3 EOSIE: End of regular sequence of conversions interrupt enableThis bit is set and cleared by software to enable/disable the end of regular sequence of conversions interrupt.
0: EOS interrupt disabled
1: EOS interrupt enabled. An interrupt is generated when the EOS bit is set.
Note: The software is allowed to write this bit only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bit 2 EOCIE: End of regular conversion interrupt enableThis bit is set and cleared by software to enable/disable the end of a regular conversion interrupt.
0: EOC interrupt disabled.
1: EOC interrupt enabled. An interrupt is generated when the EOC bit is set.
Note: The software is allowed to write this bit only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bit 1 EOSMPIE: End of sampling flag interrupt enable for regular conversionsThis bit is set and cleared by software to enable/disable the end of the sampling phase interrupt for regular conversions.
0: EOSMP interrupt disabled.
1: EOSMP interrupt enabled. An interrupt is generated when the EOSMP bit is set.
Note: The software is allowed to write this bit only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bit 0 ADRDYIE: ADC ready interrupt enableThis bit is set and cleared by software to enable/disable the ADC Ready interrupt.
0: ADRDY interrupt disabled
1: ADRDY interrupt enabled. An interrupt is generated when the ADRDY bit is set.
Note: The software is allowed to write this bit only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
23.7.3 ADC control register (ADC_CR)
Address offset: 0x008
Reset value: 0x2000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ADCAL | Res. | DEEPPWD | ADVREGEN | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| rs | rw | rw | |||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | JADSTP | ADSTP | JADSTART | ADSTART | ADDIS | ADEN |
| rs | rs | rs | rs | rs | rs |
Bit 31 ADCAL: ADC calibration
This bit is set by software to enter ADC calibration mode.
0: Normal mode
1: Calibration mode
Note: The software is allowed to launch a calibration by setting ADCAL only when ADEN = 0.
The software is allowed to update the calibration factor by writing ADC_CALFACT only when ADEN = 1 and ADSTART = 0 and JADSTART = 0 (ADC enabled and no conversion is ongoing)
Bit 30 Reserved, must be kept at reset value.
Bit 29 DEEPPWD: Deep-power-down enable
This bit is set and cleared by software to put the ADC in Deep-power-down mode.
0: ADC not in Deep-power down
1: ADC in Deep-power-down (default reset state)
Note: The software is allowed to write this bit only when the ADC is disabled (ADCAL = 0 and ADEN = 0).
Bit 28 ADVREGEN: ADC internal voltage regulator enable
This bit is set by software to enable the ADC internal voltage regulator.
Before performing any operation such as launching a calibration or enabling the ADC, the ADC voltage regulator must first be enabled and the software must wait for the regulator start-up time.
0: ADC internal voltage regulator disabled
1: ADC internal voltage regulator enabled.
For more details about the ADC voltage regulator enable and disable sequences, refer to Section 23.4.6: ADC Deep-power-down mode (DEEPPWD) and ADC voltage regulator (ADVREGEN) .
The software can program this bit field only when the ADC is disabled (ADCAL=0, JADSTART=0, ADSTART=0, ADSTP=0, ADDIS=0 and ADEN=0).
Bits 27:6 Reserved, must be kept at reset value.
Bit 5 JADSTP: ADC stop of injected conversion commandThis bit is set by software to stop and discard an ongoing injected conversion (JADSTP command).
It is cleared by hardware when the conversion is effectively discarded and the ADC injected sequence and triggers can be reconfigured. The ADC is then ready to accept a new start of injected conversions (JADSTART command).
When a software trigger is used, JADSTART bit is cleared by hardware, but JADSTP bit must be programmed to reconfigure the ADC.
0: No ADC stop injected conversion command ongoing
1: Write 1 to stop injected conversions ongoing. Read 1 means that an ADSTP command is in progress.
Note: In autoinjection mode (JAUTO = 1), setting ADSTP bit aborts both regular and injected conversions (do not use JADSTP).
Bit 4 ADSTP: ADC stop of regular conversion commandThis bit is set by software to stop and discard an ongoing regular conversion (ADSTP command).
It is cleared by hardware when the conversion is effectively discarded. and the ADC regular sequence and triggers can be re-configured. The ADC is then ready to accept a new start of regular conversions (ADSTART command).
When a software trigger is used, ADSTART bit is cleared by hardware. However it is necessary to write ADSTP bit to reconfigure the ADC.
0: No ADC stop regular conversion command ongoing
1: Write 1 to stop ongoing regular conversions. Read 1 means that an ADSTP command is in progress.
Note: In autoinjection mode (JAUTO = 1), setting ADSTP bit aborts both regular and injected conversions (do not use ADSTP).
Note: In dual ADC regular simultaneous and interleaved modes, the ADSTP bit of the master ADC must be used to stop regular conversions on both ADCs. The other ADSTP bit is inactive.
Bit 3 JADSTART: ADC start of injected conversionThis bit is set by software to start ADC conversion of injected channels. Depending on the configuration bits JEXTEN[1:0], a conversion starts immediately (software trigger configuration) or once an injected hardware trigger event occurs (hardware trigger configuration).
- – In single conversion mode when software trigger is selected (JEXTSEL = 0x0 and JDISEN = 1), this bit is cleared by hardware immediately after injected conversion starts.
- – In all cases, after the execution of the JADSTP command, this bit and JADSTP are cleared by hardware simultaneously.
0: No ADC injected conversion is ongoing.
1: Write 1 to start injected conversions. Read 1 means that the ADC is operating and eventually converting an injected channel.
Note: The software is allowed to set JADSTART only when ADEN = 1, ADDIS = 0 and JAUTO = 0 (ADC is enabled and there is no pending request to disable the ADC).
Note: In autoinjection mode (JAUTO = 1), regular and autoinjected conversions are started by setting ADSTART bit (JADSTART must be kept cleared).
Bit 2 ADSTART: ADC start of regular conversionThis bit is set by software to start ADC conversion of regular channels. Depending on the configuration bits EXTEN[1:0], a conversion starts immediately (software trigger configuration) or once a regular hardware trigger event occurs (hardware trigger configuration).
- – In single conversion mode when software trigger is selected (EXTSEL = 0x0 and DISEN = 1), this bit is cleared by hardware immediately after regular conversion starts.
- – In all cases, after the execution of the ADSTP command, this bit and ADSTP are cleared by hardware simultaneously.
0: No ADC regular conversion is ongoing.
1: Write 1 to start regular conversions. Read 1 means that the ADC is operating and eventually converting a regular channel.
Note: The software is allowed to set ADSTART only when ADEN = 1 and ADDIS = 0 (ADC is enabled and there is no pending request to disable the ADC).
Note: In autoinjection mode (JAUTO = 1), regular and autoinjected conversions are started by setting ADSTART bit (JADSTART must be kept cleared)
Bit 1 ADDIS: ADC disable commandThis bit is set by software to disable the ADC (ADDIS command) and place it into power-down state (OFF state).
It is cleared by hardware once the ADC is effectively disabled (ADEN is also cleared by hardware at this time).
0: no ADDIS command ongoing
1: Write 1 to disable the ADC. Read 1 means that an ADDIS command is in progress.
Note: The software is allowed to set ADDIS only when ADEN = 1, ADDIS = 0 and both ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Bit 0 ADEN: ADC enable controlThis bit is set by software to enable the ADC. The ADC is effectively ready to operate once the ADRDY flag has been set.
It is cleared by hardware when the ADC is disabled, after the execution of the ADDIS command.
0: ADC is disabled (OFF state)
1: Write 1 to enable the ADC.
Note: The software is allowed to set ADEN only when all the bits of ADC_CR registers are cleared (ADCAL = 0, JADSTART = 0, ADSTART = 0, ADSTP = 0, ADDIS = 0 and ADEN = 0), except for ADVREGEN bit which must be set. In addition, the software must wait for the startup time of the voltage regulator.
23.7.4 ADC configuration register (ADC_CFGR1)
Address offset: 0x00C
Reset value: 0x8000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| JQDIS | AWD1CH[4:0] | JAUTO | JAWD1EN | AWD1EN | AWD1SGL | JQM | JDISCEN | DISCNUM[2:0] | DISCEN | ||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | AUTDLY | CONT | OVRMOD | EXTEN[1:0] | EXTSEL[4:0] | Res. | RES[1:0] | DMNGT[1:0] | |||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | |||
Bit 31 JQDIS: Injected queue disable
This bit is set and cleared by software to disable the injected queue mechanism:
0: Injected queue enabled
1: Injected queue disabled
Note: The software is allowed to write this bit only when ADEN = 0, ADSTART = 0, and JADSTART = 0.
Note: A set or reset of JQDIS bit causes the injected queue to be flushed and the ADC_JSQR register is cleared.
Bits 30:26 AWD1CH[4:0]: Analog watchdog 1 channel selection
These bits are set and cleared by software. They select the input channel to be guarded by the analog watchdog.
00000: ADC analog input channel 0 monitored by AWD1
00001: ADC analog input channel 1 monitored by AWD1
.....
10010: ADC analog input channel 18 monitored by AWD1
Others: reserved, must not be used
Note: Some channels are not connected physically. Keep the corresponding AWD1CH[4:0] setting to the reset value.
Note: The channel selected by AWD1CH must be also selected into the SQ Ri or JSQ Ri registers.
The software is allowed to write these bits only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Bit 25 JAUTO: Automatic injected group conversion
This bit is set and cleared by software to enable/disable automatic injected group conversion after regular group conversion.
0: Automatic injected group conversion disabled
1: Automatic injected group conversion enabled
Note: The software is allowed to write this bit only when ADEN = 0.
Note: When dual mode is enabled (DUAL bits in ADCC_CCR register are not equal to zero), the JAUTO bit of the slave ADC is not valid and controlled by the JAUTO bit of the master ADC.
Bit 24 JAWD1EN: Analog watchdog 1 enable on injected channels
This bit is set and cleared by software
0: Analog watchdog 1 disabled on injected channels
1: Analog watchdog 1 enabled on injected channels
Note: The software is allowed to write this bit only when JADSTART = 0 (which ensures that no injected conversion is ongoing).
Bit 23 AWD1EN: Analog watchdog 1 enable on regular channelsThis bit is set and cleared by software
0: Analog watchdog 1 disabled on regular channels
1: Analog watchdog 1 enabled on regular channels
Note: The software is allowed to write this bit only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bit 22 AWD1SGL: Enable the watchdog 1 on a single channel or on all channelsThis bit is set and cleared by software to enable the analog watchdog on the channel identified by the AWD1CH[4:0] bits or on all the channels
0: Analog watchdog 1 enabled on all channels
1: Analog watchdog 1 enabled on a single channel
Note: The software is allowed to write these bits only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Bit 21 JQM: ADC_JSQR queue modeThis bit is set and cleared by software.
It defines how an empty Queue is managed.
0: ADC_JSQR mode 0: The Queue is never empty and maintains the last written configuration to ADC_JSQR.
1: ADC_JSQR mode 1: The Queue can be empty and when this occurs, the software and hardware triggers of the injected sequence are both internally disabled just after the completion of the last valid injected sequence.
Refer to Section 23.4.21: Queue of context for injected conversions for more information.
Note: The software is allowed to write this bit only when JADSTART = 0 (which ensures that no injected conversion is ongoing).
Note: When dual mode is enabled (DUAL bits in ADCC_CCR register are not equal to zero), the JQM bit of the slave ADC is not valid and controlled by the JQM bit of the master ADC.
Bit 20 JDISCEN: Discontinuous mode on injected channelsThis bit is set and cleared by software to enable/disable discontinuous mode on the injected channels of a group.
0: Discontinuous mode on injected channels disabled
1: Discontinuous mode on injected channels enabled
Note: The software is allowed to write this bit only when JADSTART = 0 (which ensures that no injected conversion is ongoing).
Note: It is not possible to use autoinjection mode and discontinuous mode simultaneously: the DISCEN and JDISCEN bits must be kept cleared by software when JAUTO is set.
Note: When dual mode is enabled (DUAL bits of ADCC_CCR register are not equal to zero), the JDISCEN bit of the slave ADC is not valid and controlled by the JDISCEN bit of the master ADC.
Bits 19:17 DISCNUM[2:0]: Discontinuous mode channel countThese bits are written by software to define the number of regular channels to be converted in discontinuous mode, after receiving an external trigger.
000: 1 channel
001: 2 channels
...
111: 8 channels
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Note: When dual mode is enabled (DUAL bits in ADCC_CCR register are not equal to zero), the DISCNUM[2:0] bits of the slave ADC are not valid and controlled by the DISCNUM[2:0] bits of the master ADC.
Bit 16 DISCEN: Discontinuous mode for regular channelsThis bit is set and cleared by software to enable/disable discontinuous mode for regular channels.
0: Discontinuous mode for regular channels disabled
1: Discontinuous mode for regular channels enabled
Note: It is not possible to have both discontinuous mode and continuous mode enabled: DISCEN and CONT cannot both be set (DISCEN takes priority).
Note: It is not possible to use autoinjection mode and discontinuous mode simultaneously: the DISCEN and JDISCEN bits must be kept cleared by software when JAUTO is set.
Note: The software is allowed to write this bit only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Note: When regular dual mode is enabled (DUAL bits in ADCC_CCR register are not equal to zero), the DISCEN bit of the slave ADC is not valid and controlled by the DISCEN bit of the master ADC.
Bit 15 Reserved, must be kept at reset value. Bit 14 AUTDLY: Delayed conversion modeThis bit is set and cleared by software to enable/disable the autodelayed conversion mode.
0: Autodelayed conversion mode off
1: Autodelayed conversion mode on
Note: The software is allowed to write this bit only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Note: When dual mode is enabled (DUAL bits in ADCC_CCR register are not equal to zero), the AUTDLY bit of the slave ADC is not valid and controlled by the AUTDLY bit of the master ADC.
Bit 13 CONT: Single / continuous conversion mode for regular conversionsThis bit is set and cleared by software. If it is set, regular conversion takes place continuously until it is cleared.
0: Single conversion mode
1: Continuous conversion mode
Note: It is not possible to have both discontinuous mode and continuous mode enabled: DISCEN and CONT cannot both be set (DISCEN takes priority).
Note: The software is allowed to write this bit only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Note: When regular dual mode is enabled (DUAL bits in ADCC_CCR register are not equal to zero), the CONT bit of the slave ADC is not valid and controlled by the CONT bit of the master ADC.
Bit 12 OVRMOD: Overrun modeThis bit is set and cleared by software and configure the way data overrun is managed.
0: ADC_DR register is preserved with the old data when an overrun is detected.
1: ADC_DR register is overwritten with the last conversion result when an overrun is detected.
Note: The software is allowed to write this bit only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bits 11:10 EXTEN[1:0]: External trigger enable and polarity selection for regular channelsThese bits are set and cleared by software to select the external trigger polarity and enable the trigger of a regular group.
00: Hardware trigger detection disabled (conversions can be launched by software)
01: Hardware trigger detection on the rising edge
10: Hardware trigger detection on the falling edge
11: Hardware trigger detection on both the rising and falling edges
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bits 9:5 EXTSEL[4:0] : External trigger selection for regular group
These bits select the external event used to trigger the start of conversion of a regular group:
00000: adc_ext_trg0
00001: adc_ext_trg1
00010: adc_ext_trg2
00011: adc_ext_trg3
00100: adc_ext_trg4
00101: adc_ext_trg5
00110: adc_ext_trg6
00111: adc_ext_trg7
...
11111: adc_ext_trg31
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bit 4 Reserved, must be kept at reset value.
Bits 3:2 RES[1:0] : Data resolution
These bits are written by software to select the resolution of the conversion.
00: 12-bit
01: 10-bit
10: 8-bit
11: 6-bit
Note: The software is allowed to write these bits only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Bits 1:0 DMNGT[1:0] : Data management configuration
These bits are set and cleared by software to select how the ADC interface output data are managed.
00: Regular conversion data stored in DR only
01: DMA one-shot mode selected
10: ADF mode selected
11: DMA circular mode selected
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no conversion is ongoing).
23.7.5 ADC configuration register 2 (ADC_CFGR2)
Address offset: 0x010
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| LSHIFT[3:0] | Res. | Res. | OVSR[9:0] | ||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | ||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| SMPTRIG | SWTRIG | BULB | Res. | Res. | ROVSM | TROVS | OVSS[3:0] | Res. | Res. | Res. | ROVSE | ||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | ||||||
This bitfield is set and cleared by software to define the left shifting applied to the final result with or without oversampling.
0000: No left shift
0001: 1-bit left shift
0010: 2-bit left shift
0011: 3-bit left shift
0100: 4-bit left shift
0101: 5-bit left shift
0110: 6-bit left shift
0111: 7-bit left shift
1000: 8-bit left shift
1001: 9-bit left shift
1010: 10-bit left shift
1011: 11-bit left shift
1100: 12-bit left shift
1101: 13-bit left shift
1110: 14-bit left shift
1111: 15-bit left shift
Note: The software is allowed to write this bit only when ADSTART = 0 (which ensures that no conversion is ongoing).
Bits 27:26 Reserved, must be kept at reset value.
Bits 25:16 OVSFR[9:0] : Oversampling ratioThis bitfield is set and cleared by software to define the oversampling ratio.
0: 1x (no oversampling)
1: 2x
2: 3x
...
1023: 1024x
Note: The software is allowed to write this bit only when ADSTART = 0 (which ensures that no conversion is ongoing).
Bit 15 SMPTRIG : Sampling time control trigger modeThis bit is set and cleared by software to enable the sampling time control trigger mode.
0: Sampling time control trigger mode disabled
1: Sampling time control trigger mode enabled
If EXTEN[1:0] bits are set to 01, the sampling time starts on the trigger rising edge, and the conversion starts on the trigger falling edge.
The SMPTRIG bit must not be set when the BULB bit is set.
When EXTEN[1:0] bits are set to 00, set SWTRIG to start the sampling.
Note: The software is allowed to write this bit only when ADEN = 0. When the discontinuous mode is used, only DISCNUM[2:0] = 000 configuration is compatible with sampling time control trigger mode.
Bit 14 SWTRIG : Software trigger bit for sampling time control trigger modeThis bit is set and cleared by software to trigger the conversion in sampling time control trigger mode.
0: Software trigger starts the conversion for sampling time control trigger mode
1: Software trigger starts the sampling for sampling time control trigger mode
Note: The software is allowed to write this bit only when ADSTART = 0 (which ensures that no conversion is ongoing), SMPTRIG = 1, and EXTEN[0:1] = 00.
Bit 13 BULB: Bulb sampling modeThis bit is set and cleared by software to enable the bulb sampling mode.
0: Bulb sampling mode disabled
1: Bulb sampling mode enabled. The sampling period starts just after the previous end of conversion.
BULB bit must not be set when the SWTRIG bit is set.
The very first ADC conversion is performed with the sampling time specified in SMPx bits.
Note: The software is allowed to write this bit only when ADEN = 0. When the discontinuous mode is used, only DISCNUM[2:0] = 000 configuration is compatible with bulb mode.
Bits 12:11 Reserved, must be kept at reset value.
Bit 10 ROVSM: Regular oversampling modeThis bit is set and cleared by software to select the regular oversampling mode.
0: Continued mode: When injected conversions are triggered, the oversampling is temporary stopped and continued after the injection sequence (oversampling buffer is maintained during injected sequence)
1: Resumed mode: When injected conversions are triggered, the current oversampling is aborted and resumed from start after the injection sequence (oversampling buffer is zeroed by injected sequence start)
Note: The software is allowed to write this bit only when ADSTART = 0 (which ensures that no conversion is ongoing). It is recommended to clear both JOVSE and GCOMP when ROVSM = 0.
Bit 9 TROVS: Triggered regular oversamplingThis bit is set and cleared by software to enable triggered oversampling
0: All oversampled conversions for a channel are done consecutively following a trigger
1: Each oversampled conversion for a channel needs a new trigger
Note: The software is allowed to write this bit only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Bits 8:5 OVSS[3:0] : Oversampling shift
This bitfield is set and cleared by software to define the right shifting applied to the raw oversampling result.
- 0000: No shift
- 0001: 1-bit shift
- 0010: 2-bit shift
- 0011: 3-bit shift
- 0100: 4-bit shift
- 0101: 5-bit shift
- 0110: 6-bit shift
- 0111: 7-bit shift
- 1000: 8-bit shift
- 1001: 9-bit shift
- 1010: 10-bit shift
Other: reserved, must not be used
Note: The software is allowed to write this bit only when ADSTART = 0 (which ensures that no conversion is ongoing).
Bits 4:1 Reserved, must be kept at reset value.
Bit 0 ROVSE : Regular oversampling enable
This bit is set and cleared by software to enable regular oversampling.
- 0: Regular oversampling disabled
- 1: Regular oversampling enabled
Note: The software is allowed to write this bit only when ADSTART = 0 (which ensures that no conversion is ongoing)
23.7.6 ADC sample time register 1 (ADC_SMPR1)
Address offset: 0x014
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | SMP9[2:0] | SMP8[2:0] | SMP7[2:0] | SMP6[2:0] | SMP5[2:1] | |||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | ||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| SMP5[0] | SMP4[2:0] | SMP3[2:0] | SMP2[2:0] | SMP1[2:0] | SMP0[2:0] | ||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:30 Reserved, must be kept at reset value.
Bits 29:0 SMPx[2:0] : Channel x sampling time selection (x = 9 to 0)
These bits are written by software to select the sampling time individually for each channel. During sample cycles, the channel selection bits must remain unchanged.
000: 1.5 ADC clock cycles
001: 2.5 ADC clock cycles
010: 6.5 ADC clock cycles
011: 11.5 ADC clock cycles
100: 23.5 ADC clock cycles
101: 46.5 ADC clock cycles
110: 246.5 ADC clock cycles
111: 1499.5 ADC clock cycles
Note: The software is allowed to write these bits only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Note: Some channels are not connected physically. Keep the corresponding SMPx[2:0] setting to the reset value.
23.7.7 ADC sample time register 2 (ADC_SMPR2)
Address offset: 0x018
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | SMP18[2:0] | SMP17[2:0] | SMP16[2:0] | SMP15[2:1] | |||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | |||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| SMP15[0] | SMP14[2:0] | SMP13[2:0] | SMP12[2:0] | SMP11[2:0] | SMP10[2:0] | ||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:27 Reserved, must be kept at reset value.
Bits 26:0 SMPx[2:0] : Channel x sampling time selection (x = 18 to 10)
These bits are written by software to select the sampling time individually for each channel. During sampling cycles, the channel selection bits must remain unchanged.
000: 1.5 ADC clock cycles
001: 2.5 ADC clock cycles
010: 6.5 ADC clock cycles
011: 11.5 ADC clock cycles
100: 23.5 ADC clock cycles
101: 46.5 ADC clock cycles
110: 246.5 ADC clock cycles
111: 1499.5 ADC clock cycles
Note: The software is allowed to write these bits only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Note: Some channels are not connected physically. Keep the corresponding SMPx[2:0] setting to the reset value.
23.7.8 ADC channel preselection register (ADC_PCSEL)
Address offset: 0x01C
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | PCSEL[18:16] | ||
| rw | rw | rw | |||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| PCSEL[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:19 Reserved, must be kept at reset value.
Bits 18:0 PCSEL[18:0] : Channel i ( \( V_{IN[i]} \) ) preselection
These bits are written by software to preselect the input channel I/O to be converted.
0: Input channel i ( \( V_{IN[i]} \) ) is not preselected for conversion, the result of the ADC conversion for this channel is wrong
1: Input channel i ( \( V_{IN[i]} \) ) is preselected for conversion
Note: The software is allowed to write these bits only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Configuring the PCSEL bit is not necessary for the internal channels (such as VREFINT).
23.7.9 ADC regular sequence register 1 (ADC_SQR1)
Address offset: 0x030
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | SQ4[4:0] | Res. | SQ3[4:0] | Res. | SQ2[4] | ||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | |||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| SQ2[3:0] | Res. | SQ1[4:0] | Res. | Res. | LEN[3:0] | ||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | |||
Bits 31:29 Reserved, must be kept at reset value.
Bits 28:24 SQ4[4:0] : 4th conversion in regular sequence
These bits are written by software with the channel number (0 to 18) assigned as the 4th in the regular conversion sequence.
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bit 23 Reserved, must be kept at reset value.
Bits 22:18 SQ3[4:0] : 3rd conversion in regular sequence
These bits are written by software with the channel number (0 to 18) assigned as the 3rd in the regular conversion sequence.
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bit 17 Reserved, must be kept at reset value.
Bits 16:12 SQ2[4:0] : 2nd conversion in regular sequence
These bits are written by software with the channel number (0 to 18) assigned as the 2nd in the regular conversion sequence.
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bit 11 Reserved, must be kept at reset value.
Bits 10:6 SQ1[4:0] : 1st conversion in regular sequence
These bits are written by software with the channel number (0 to 18) assigned as the 1st in the regular conversion sequence.
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bits 5:4 Reserved, must be kept at reset value.
Bits 3:0 LEN[3:0] : Regular channel sequence length
These bits are written by software to define the total number of conversions in the regular channel conversion sequence.
0000: 1 conversion
0001: 2 conversions
...
1111: 16 conversions
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Note: Some channels are not connected physically and must not be selected for conversion.
23.7.10 ADC regular sequence register 2 (ADC_SQR2)
Address offset: 0x034
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | SQ9[4:0] | Res. | SQ8[4:0] | Res. | SQ7[4] | ||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | |||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| SQ7[3:0] | Res. | SQ6[4:0] | Res. | SQ5[4:0] | |||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | |
Bits 31:29 Reserved, must be kept at reset value.
Bits 28:24 SQ9[4:0] : 9th conversion in regular sequence
These bits are written by software with the channel number (0 to 18) assigned as the 9th in the regular conversion sequence.
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bit 23 Reserved, must be kept at reset value.
Bits 22:18 SQ8[4:0] : 8th conversion in regular sequence
These bits are written by software with the channel number (0 to 18) assigned as the 8th in the regular conversion sequence
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bit 17 Reserved, must be kept at reset value.
Bits 16:12 SQ7[4:0] : 7th conversion in regular sequence
These bits are written by software with the channel number (0 to 18) assigned as the 7th in the regular conversion sequence.
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bit 11 Reserved, must be kept at reset value.
Bits 10:6 SQ6[4:0] : 6th conversion in regular sequence
These bits are written by software with the channel number (0 to 18) assigned as the 6th in the regular conversion sequence.
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bit 5 Reserved, must be kept at reset value.
Bits 4:0 SQ5[4:0] : 5th conversion in regular sequence
These bits are written by software with the channel number (0 to 18) assigned as the 5th in the regular conversion sequence.
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Note: Some channels are not connected physically and must not be selected for conversion.
23.7.11 ADC regular sequence register 3 (ADC_SQR3)
Address offset: 0x038
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | SQ14[4:0] | Res. | SQ13[4:0] | Res. | SQ12[4] | ||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | |||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| SQ12[3:0] | Res. | SQ11[4:0] | Res. | SQ10[4:0] | |||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | ||
Bits 31:29 Reserved, must be kept at reset value.
Bits 28:24 SQ14[4:0] : 14th conversion in regular sequence
These bits are written by software with the channel number (0 to 18) assigned as the 14th in the regular conversion sequence.
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bit 23 Reserved, must be kept at reset value.
Bits 22:18 SQ13[4:0] : 13th conversion in regular sequence
These bits are written by software with the channel number (0 to 18) assigned as the 13th in the regular conversion sequence.
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bit 17 Reserved, must be kept at reset value.
Bits 16:12 SQ12[4:0] : 12th conversion in regular sequence
These bits are written by software with the channel number (0 to 18) assigned as the 12th in the regular conversion sequence.
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bit 11 Reserved, must be kept at reset value.
Bits 10:6 SQ11[4:0] : 11th conversion in regular sequence
These bits are written by software with the channel number (0 to 18) assigned as the 11th in the regular conversion sequence.
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bit 5 Reserved, must be kept at reset value.
Bits 4:0 SQ10[4:0] : 10th conversion in regular sequence
These bits are written by software with the channel number (0 to 18) assigned as the 10th in the regular conversion sequence.
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Note: Some channels are not connected physically and must not be selected for conversion.
23.7.12 ADC regular sequence register 4 (ADC_SQR4)
Address offset: 0x03C
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | SQ16[4:0] | Res. | SQ15[4:0] | ||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | ||||||
Bits 31:11 Reserved, must be kept at reset value.
Bits 10:6 SQ16[4:0] : 16th conversion in regular sequence
These bits are written by software with the channel number (0 to 18) assigned as the 16th in the regular conversion sequence.
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Bit 5 Reserved, must be kept at reset value.
Bits 4:0 SQ15[4:0] : 15th conversion in regular sequence
These bits are written by software with the channel number (0 to 18) assigned as the 15th in the regular conversion sequence.
Note: The software is allowed to write these bits only when ADSTART = 0 (which ensures that no regular conversion is ongoing).
Note: Some channels are not connected physically and must not be selected for conversion.
23.7.13 ADC regular data register (ADC_DR)
Address offset: 0x040
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| RDATA[31:16] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RDATA[15:0] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
Bits 31:0 RDATA[31:0] : Regular data converted
These bits are read-only. They contain the conversion result from the last converted regular channel. The data are left- or right-aligned as described in Section 23.4.26: Data management .
23.7.14 ADC injected sequence register (ADC_JSQR)
Address offset: 0x04C
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| JSQ4[4:0] | Res. | JSQ3[4:0] | Res. | JSQ2[4:1] | |||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | ||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| JSQ2[0] | Res. | JSQ1[4:0] | JEXTEN[1:0] | JEXTSEL[4:0] | JLEN[1:0] | ||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | |
Bits 31:27 JSQ4[4:0] : 4th conversion in the injected sequence
These bits are written by software with the channel number (0 to 18) assigned as the 4th in the injected conversion sequence.
Note: The software is allowed to write these bits only when JQDIS = 0 or when JADSTART = 0 and JQDIS = 1 (which ensures that no injected conversion is ongoing).
Bit 26 Reserved, must be kept at reset value.
Bits 25:21 JSQ3[4:0] : 3rd conversion in the injected sequence
These bits are written by software with the channel number (0 to 18) assigned as the 3rd in the injected conversion sequence.
Note: The software is allowed to write these bits only when JQDIS = 0 or when JADSTART = 0 and JQDIS = 1 (which ensures that no injected conversion is ongoing).
Bit 20 Reserved, must be kept at reset value.
Bits 19:15 JSQ2[4:0] : 2nd conversion in the injected sequence
These bits are written by software with the channel number (0 to 18) assigned as the 2nd in the injected conversion sequence.
Note: The software is allowed to write these bits only when JQDIS = 0 or when JADSTART = 0 and JQDIS = 1 (which ensures that no injected conversion is ongoing).
Bit 14 Reserved, must be kept at reset value.
Bits 13:9 JSQ1[4:0] : 1st conversion in the injected sequence
These bits are written by software with the channel number (0 to 18) assigned as the 1st in the injected conversion sequence.
Note: The software is allowed to write these bits only when JQDIS = 0 or when JADSTART = 0 and JQDIS = 1 (which ensures that no injected conversion is ongoing).
Bits 8:7 JEXTEN[1:0] : External trigger enable and polarity selection for injected channels
These bits are set and cleared by software to select the external trigger polarity and enable the trigger of an injected group.
- 00: Hardware trigger detection disabled (conversions can be launched by software)
- 01: Hardware trigger detection on the rising edge
- 10: Hardware trigger detection on the falling edge
- 11: Hardware trigger detection on both the rising and falling edges
Note: The software is allowed to write these bits only when JQDIS = 0 or when JADSTART = 0 and JQDIS = 1 (which ensures that no injected conversion is ongoing).
Bits 6:2 JEXTSEL[4:0] : External trigger selection for injected group
These bits select the external event used to trigger the start of conversion of an injected group:
- 00000: adc_jext_trg0
- 00001: adc_jext_trg1
- 00010: adc_jext_trg2
- 00011: adc_jext_trg3
- 00100: adc_jext_trg4
- 00101: adc_jext_trg5
- 00110: adc_jext_trg6
- 00111: adc_jext_trg7
- ...
- 11111: adc_jext_trg31
Note: The software is allowed to write these bits only when JQDIS = 0 or when JADSTART = 0 and JQDIS = 1 (which ensures that no injected conversion is ongoing).
Bits 1:0 JLEN[1:0] : Injected channel sequence length
These bits are written by software to define the total number of conversions in the injected channel conversion sequence.
- 00: 1 conversion
- 01: 2 conversions
- 10: 3 conversions
- 11: 4 conversions
Note: The software is allowed to write these bits only when JQDIS = 0 or when JADSTART = 0 and JQDIS = 1 (which ensures that no injected conversion is ongoing).
Note: Some channels are not connected physically and must not be selected for conversion.
23.7.15 ADC offset y configuration register (ADC_OFCFGRy)
Address offset: 0x050 + 0x004 * (y -1), (y = 1 to 4)
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| OFFSET_CH[4:0] | SSAT | USAT | POS OFF | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | ||||
| rw | rw | rw | rw | rw | rw | rw | rw | ||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
Bits 31:27 OFFSET_CH[4:0] : Channel selection for the data offset y
These bits are written by software to define the channel to which the offset programmed in bits OFFSET[21:0] applies.
Note: The software is allowed to write these bits only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Note: Some channels are not connected physically and must not be selected for the data offset y.
Bit 26 SSAT : Signed saturation enable
This bit is set and cleared by software to enable the signed saturation feature.(see Section : Data register, data alignment and offset (ADC_DR, ADC_JDRy, OFFSETy, OFFSETy_CH, OVSS, LSHIFT, JOVSS, JLSHIFT (a) , USAT, SSAT, POSOFF) ).
0: Offset is subtracted maintaining the data integrity and extending converted data size (13-bit signed format)
1: Offset is subtracted and result is saturated to maintain the converted data size
Note: The software is allowed to write these bits only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Bit 25 USAT : Unsigned saturation enable
This bit is set and cleared by software to enable the unsigned saturation feature.
0: Offset is subtracted maintaining the data integrity
1: Offset is subtracted and result is saturated to maintain the converted data size
Note: The software is allowed to write these bits only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Bit 24 POSOFF : Positive offset enable
This bit is set and cleared by software to enable the positive offset
0: Negative offset
1: Positive offset
Note: The software is allowed to write these bits only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Bits 23:0 Reserved, must be kept at reset value.
23.7.16 ADC offset y register (ADC_OFRy)
Address offset: 0x060 + 0x004 * (y -1), (y= 1 to 4)
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | OFFSET[21:16] | |||||
| rw | rw | rw | rw | rw | rw | ||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| OFFSET[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:22 Reserved, must be kept at reset value.
Bits 21:0 OFFSET[21:0] : Data offset y for the channel programmed in OFFSETy_CH[4:0] bits
These bits are written by software to define the offset y to be subtracted from the raw converted data when converting a channel (can be regular or injected). The channel to which applies the data offset y must be programmed in the OFFSETy_CH[4:0] bits. The conversion result can be read from in the ADC_DR (regular conversion) or from in the ADC_JDRyi registers (injected conversion).
Note: The software is allowed to write these bits only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
23.7.17 ADC gain compensation register (ADC_GCOMP)
Address offset: 0x070
Reset value: 0x0000 1000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| G COMP | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| rw | |||||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | GCOMPCOEFF[13:0] | |||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | ||
Bit 31 GCOMP : Gain compensation mode
This bit is set and cleared by software to enable the Gain compensation mode.
0: Regular ADC operation mode
1: Gain compensation enabled and applied on all channels.
Note: The software is allowed to write this bit only when ADSTART = 0 and JADSTART = 0 (which ensure that no conversion is ongoing)
Bits 30:14 Reserved, must be kept at reset value.
Bits 13:0 GCOMPCOEFF[13:0] : Gain compensation coefficient
These bits are set and cleared by software to program the gain compensation coefficient.
00 1000 0000 0000: gain factor of 0.5
...
01 0000 0000 0000: gain factor of 1
10 0000 0000 0000: gain factor of 2
11 0000 0000 0000: gain factor of 3
...
The coefficient is divided by 4096 to get the gain factor ranging from 0 to 3.9999756
Note: This gain compensation is only applied when GCOMP bit is set.
Note: The software is allowed to write this bit only when ADSTART = 0 and JADSTART = 0 (which ensure that no conversion is ongoing).
23.7.18 ADC injected channel y data register (ADC_JDRy)
Address offset: \( 0x080 + 0x004 \cdot (y - 1) \) , ( \( y = 1 \) to \( 4 \) )
Reset value: 0x0000 0000

| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| JDATA[31:16] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| JDATA[15:0] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
Bits 31:0 JDATA[31:0] : Injected data
These bits are read-only. They contain the conversion result from injected channel y. The data are left- or right-aligned as described in Section 23.4.26: Data management .
23.7.19 ADC analog watchdog 2 configuration register (ADC_AWD2CR)
Address offset: 0x0A0
Reset value: 0x0000 0000

| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | AWDCH[18:16] | ||
| rw | rw | rw | |||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| AWDCH[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:19 Reserved, must be kept at reset value.
Bits 18:0 AWDCH[18:0] : Analog watchdog 2 channel selection
These bits are set and cleared by software. They enable and select the input channels to be guarded by the analog watchdog 2.
\(
AWDCH[i] = 0
\)
: ADC analog input channel i is not monitored by AWD2
\(
AWDCH[i] = 1
\)
: ADC analog input channel i is monitored by AWD2
When
\(
AWDCH[18:0] = 000..0
\)
, the analog Watchdog 2 is disabled
Note: The channels selected by AWDCH must be also selected in the SQi or JSQi bits.
Note: The software is allowed to write these bits only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Note: Some channels are not connected physically and must not be selected for the analog watchdog.
23.7.20 ADC analog watchdog 3 configuration register (ADC_AWD3CR)
Address offset: 0x0A4
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | AWDCH[18:16] | ||
| rw | rw | rw | |||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| AWDCH[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:19 Reserved, must be kept at reset value.
Bits 18:0 AWDCH[18:0] : Analog watchdog 3 channel selection
These bits are set and cleared by software. They enable and select the input channels to be guarded by the analog watchdog 3.
AWDCH[i] = 0: ADC analog input channel i is not monitored by AWD3
AWDCH[i] = 1: ADC analog input channel i is monitored by AWD3
When AWDCH[18:0] = 000..0, the analog Watchdog 3 is disabled.
Note: The channels selected by AWDCH must be also selected in the SQi or JSQi bits.
Note: The software is allowed to write these bits only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Note: Some channels are not connected physically and must not be selected for the analog watchdog.
23.7.21 ADC analog watchdog 1 lower threshold register (ADC_AWD1LTR)
Address offset: 0x0A8
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | LTR[22:16] | ||||||
| rw | rw | rw | rw | rw | rw | rw | |||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| LTR[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:23 Reserved, must be kept at reset value.
Bits 22:0 LTR[22:0] : Analog watchdog 1 lower threshold
These bits are set and cleared by software to define the lower threshold for analog watchdog 1.
23.7.22 ADC analog watchdog 1 higher threshold register (ADC_AWD1HTR)
Address offset: 0x0AC
Reset value: 0x003F FFFF
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AWDFILT[2:0] | Res. | Res. | Res. | Res. | Res. | Res. | HTR[22:16] | ||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | ||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| HTR[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:29 AWDFILT[2:0] : Analog watchdog filtering parameter
These bits are set and cleared by software.
000: No filtering, one detection generates an AWD1 flag or an interrupt
001: two consecutive detections generate an AWD1 flag or an interrupt
...
111: Eight consecutive detections generate an AWD1 flag or an interrupt
Note: The software is allowed to write these bits only when ADSTART = 0 and JADSTART = 0 (which ensures that no conversion is ongoing).
Bits 28:23 Reserved, must be kept at reset value.
Bits 22:0 HTR[22:0] : Analog watchdog 1 higher threshold
These bits are set and cleared by software to define the higher threshold for analog watchdog 1.
Refer to Analog windows watchdog section.
23.7.23 ADC analog watchdog 2 lower threshold register (ADC_AWD2LTR)
Address offset: 0x0B0
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | LTR[22:16] | ||||||
| rw | rw | rw | rw | rw | rw | rw | |||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| LTR[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:23 Reserved, must be kept at reset value.
Bits 22:0 LTR[22:0] : Analog watchdog 2 lower threshold
These bits are set and cleared by software to define the lower threshold for analog watchdog 2.
Refer to Analog windows watchdog section.
23.7.24 ADC analog watchdog 2 higher threshold register (ADC_AWD2HTR)
Address offset: 0x0B4
Reset value: 0x003F FFFF
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | HTR[22:16] | ||||||
| rw | rw | rw | rw | rw | rw | rw | |||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| HTR[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:23 Reserved, must be kept at reset value.
Bits 22:0 HTR[22:0] : Analog watchdog 2 higher threshold
These bits are set and cleared by software to define the higher threshold for analog watchdog 2. Refer to Analog windows watchdog section.
23.7.25 ADC analog watchdog 3 lower threshold register (ADC_AWD3LTR)
Address offset: 0x0B8
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | LTR[22:16] | ||||||
| rw | rw | rw | rw | rw | rw | rw | |||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| LTR[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:23 Reserved, must be kept at reset value.
Bits 22:0 LTR[22:0] : Analog watchdog 3 lower threshold
These bits are set and cleared by software to define the lower threshold for analog watchdog 3. Refer to Analog windows watchdog section.
23.7.26 ADC analog watchdog 3 higher threshold register (ADC_AWD3HTR)
Address offset: 0x0BC
Reset value: 0x003F FFFF
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | HTR[22:16] | ||||||
| rw | rw | rw | rw | rw | rw | rw | |||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| HTR[15:0] | |||||||||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw |
Bits 31:23 Reserved, must be kept at reset value.
Bits 22:0 HTR[22:0] : Analog watchdog 3 higher threshold
These bits are set and cleared by software to define the higher threshold for analog watchdog 3.
Refer to
Analog windows watchdog
section.
23.7.27 ADC calibration factors (ADC_CALFACT)
Address offset: 0x0C4
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | CALFACT[6:0] | ||||||
| rw | rw | rw | rw | rw | rw | rw | |||||||||
Bits 31:7 Reserved, must be kept at reset value.
Bits 6:0 CALFACT[6:0] : Calibration factors
These bits can be written by hardware or by software.
Once the calibration is complete, they are updated by hardware with the calibration factors.
The software can write these bits with a new calibration factor. If the new calibration factor is different from the current one stored into the analog ADC, it is applied once a new conversion is launched.
Note: The software is allowed to write these bits only when ADSTART = 0 and JADSTART = 0 (ADC is enabled, no conversion is ongoing).
23.7.28 ADC option register (ADC_OR)
Address offset: 0x0D0
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. |
Bits 31:0 Reserved, must be kept at reset value.
23.8 ADC common registers
These registers define the control and status registers common to master and slave ADCs.
23.8.1 ADC common status register (ADCC_CSR)
Address offset: 0x000
Reset value: 0x0000 0000
This register provides an image of the flags of the different ADCs. Nevertheless it is read-only and does not allow to clear the different flags. Instead each flag must be cleared by writing 0 to it in the corresponding ADC_ISR register.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | LDORDY_ SLV | Res. | JQOVF_ SLV | AWD3_ SLV | AWD2_ SLV | AWD1_ SLV | JEOS_ SLV | JEOC_ SLV | OVR_S LV | EOS_S LV | EOC_S LV | EOSM P_SLV | ADRDY_ SLV |
| r | r | r | r | r | r | r | r | r | r | r | r | ||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Res. | Res. | Res. | LDORDY Y_MST | Res. | JQOVF_ MST | AWD3_ MST | AWD2_ MST | AWD1_ MST | JEOS_ MST | JEOC_ MST | OVR_ MST | EOS_M ST | EOC_ MST | EOSM P_MST | ADRDY_ MST |
| r | r | r | r | r | r | r | r | r | r | r | r |
Bits 31:29 Reserved, must be kept at reset value.
Bit 28 LDORDY_ SLV : ADC internal voltage regulator flag of the slave ADC
This bit is a copy of the LDORDY bit in the corresponding ADC_ISR register.
Bit 27 Reserved, must be kept at reset value.
Bit 26 JQOVF_ SLV : Injected context queue overflow flag of the slave ADC
This bit is a copy of the JQOVF bit in the corresponding ADC_ISR register.
Bit 25 AWD3_ SLV : Analog watchdog 3 flag of the slave ADC
This bit is a copy of the AWD3 bit in the corresponding ADC_ISR register.
Bit 24 AWD2_ SLV : Analog watchdog 2 flag of the slave ADC
This bit is a copy of the AWD2 bit in the corresponding ADC_ISR register.
- Bit 23
AWD1_SLV
: Analog watchdog 1 flag of the slave ADC
This bit is a copy of the AWD1 bit in the corresponding ADC_ISR register. - Bit 22
JEOS_SLV
: End of injected sequence flag of the slave ADC
This bit is a copy of the JEOS bit in the corresponding ADC_ISR register. - Bit 21
JEOC_SLV
: End of injected conversion flag of the slave ADC
This bit is a copy of the JEOC bit in the corresponding ADC_ISR register. - Bit 20
OVR_SLV
: Overrun flag of the slave ADC
This bit is a copy of the OVR bit in the corresponding ADC_ISR register. - Bit 19 EOS_SLV : End of regular sequence flag of the slave ADC. This bit is a copy of the EOS bit in the corresponding ADC_ISR register.
- Bit 18
EOC_SLV
: End of regular conversion of the slave ADC
This bit is a copy of the EOC bit in the corresponding ADC_ISR register. - Bit 17
EOSMP_SLV
: End of sampling phase flag of the slave ADC
This bit is a copy of the EOSMP2 bit in the corresponding ADC_ISR register. - Bit 16
ADRDY_SLV
: Slave ADC ready
This bit is a copy of the ADRDY bit in the corresponding ADC_ISR register. - Bits 15:13 Reserved, must be kept at reset value.
- Bit 12
LDORDY_MST
: ADC internal voltage regulator flag of the master ADC
This bit is a copy of the LDORDY bit in the corresponding ADC_ISR register. - Bit 11 Reserved, must be kept at reset value.
- Bit 10
JQOVF_MST
: Injected context queue overflow flag of the master ADC
This bit is a copy of the JQOVF bit in the corresponding ADC_ISR register. - Bit 9
AWD3_MST
: Analog watchdog 3 flag of the master ADC
This bit is a copy of the AWD3 bit in the corresponding ADC_ISR register. - Bit 8
AWD2_MST
: Analog watchdog 2 flag of the master ADC
This bit is a copy of the AWD2 bit in the corresponding ADC_ISR register. - Bit 7
AWD1_MST
: Analog watchdog 1 flag of the master ADC
This bit is a copy of the AWD1 bit in the corresponding ADC_ISR register. - Bit 6
JEOS_MST
: End of injected sequence flag of the master ADC
This bit is a copy of the JEOS bit in the corresponding ADC_ISR register. - Bit 5
JEOC_MST
: End of injected conversion flag of the master ADC
This bit is a copy of the JEOC bit in the corresponding ADC_ISR register. - Bit 4
OVR_MST
: Overrun flag of the master ADC
This bit is a copy of the OVR bit in the corresponding ADC_ISR register. - Bit 3
EOS_MST
: End of regular sequence flag of the master ADC
This bit is a copy of the EOS bit in the corresponding ADC_ISR register.
- Bit 2
EOC_MST
: End of regular conversion of the master ADC
This bit is a copy of the EOC bit in the corresponding ADC_ISR register. - Bit 1
EOSMP_MST
: End of Sampling phase flag of the master ADC
This bit is a copy of the EOSMP bit in the corresponding ADC_ISR register. - Bit 0
ADRDY_MST
: Master ADC ready
This bit is a copy of the ADRDY bit in the corresponding ADC_ISR register.
23.8.2 ADC common control register (ADCC_CCR)
Address offset: 0x008
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Res. | Res. | Res. | Res. | Res. | Res. | Res. | VBATEN | TSEN | VREFEN | Res. | Res. | Res. | Res. | Res. | Res. |
| rw | rw | rw | |||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| DAMDF[1:0] | Res. | Res. | DELAY[3:0] | Res. | Res. | Res. | DUAL[4:0] | ||||||||
| rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | rw | |||||
Bits 31:25 Reserved, must be kept at reset value.
Bit 24 VBATEN : VBAT enable
This bit is set and cleared by software to enable/disable the V BAT channel.
0: V BAT channel disabled
1: V BAT channel enabled
Note: V BAT is not available on all ADC instances. Refer to Section 23.4.4: ADC connectivity for details.
Bit 23 TSEN : Temperature sensor voltage enable
This bit is set and cleared by software to control V SENSE channel.
0: Temperature sensor channel disabled
1: Temperature sensor channel enabled
Note: The temperature sensor is not available on all ADC instances. Refer to Section 23.4.4: ADC connectivity for details.
Note: The software is allowed to write this bit only when ADEN = 0.
Bit 22 VREFEN : V REFINT enable
This bit is set and cleared by software to enable/disable the V REFINT channel.
0: V REFINT channel disabled
1: V REFINT channel enabled
Note: V REFINT is not available on all ADC instances. Refer to Section 23.4.4: ADC connectivity for details.
Note: The software is allowed to write this bit only when ADEN = 0.
Bits 21:16 Reserved, must be kept at reset value.
Bits 15:14 DAMDF[1:0] : Dual ADC mode data formatThis bitfield are set and cleared by software. It specifies the data format in the common data register ADCC_CDR and ADCC_CDR2.
00: Dual ADC mode without data packing (ADCC_CDR and ADCC_CDR2 registers not used).
01: Reserved
10: Data formatting mode for any data width (ADCC_CDR data register is used when the data width is less than 16 bits, otherwise ADCC_CDR2 register is used)
11: Data formatting mode for data width lower that 8 bits (ADCC_CDR data register is used)
Note: The software is allowed to write these bits only when ADEN = 0 (ADC is disabled).
Bit 13 Reserved, must be kept at reset value.
Bit 12 Reserved, must be kept at reset value.
Bits 11:8 DELAY[3:0] : Delay between two sampling phasesThese bits are set and cleared by software. These bits are used in dual interleaved modes.
Refer to Table 218 for the value of ADC resolution versus DELAY bits values.
Note: The software is allowed to write these bits only when the ADCs are disabled (ADCAL = 0, JADSTART = 0, ADSTART = 0, ADSTP = 0, ADDIS = 0 and ADEN = 0).
Bits 7:5 Reserved, must be kept at reset value.
Bits 4:0 DUAL[4:0] : Dual ADC mode selectionThese bits are written by software to select the operating mode.
All the ADCs independent:
00000: Independent mode
The following settings apply to dual mode, master and slave ADCs working together
00001: Combined regular simultaneous + Injected simultaneous mode
00010: Combined regular simultaneous + Alternate trigger mode
00011: Combined interleaved mode + Injected simultaneous mode
00101: Injected simultaneous mode only
00110: Regular simultaneous mode only
00111: Interleaved mode only
01001: Alternate trigger mode only
Others: Reserved
All other combinations are reserved and must not be programmed
Note: The software is allowed to write these bits only when the ADCs are disabled (ADCAL = 0, JADSTART = 0, ADSTART = 0, ADSTP = 0, ADDIS = 0 and ADEN = 0).
23.8.3 ADC common regular data register for dual mode (ADCC_CDR)
Address offset: 0x00C
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| RDATA_SLV[15:0] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RDATA_MST[15:0] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
Bits 31:16 RDATA_SLV[15:0] : Regular data of the slave ADC
In dual mode, these bits contain the regular data of the slave ADC. Refer to Section 23.4.31: Dual ADC modes .
The data alignment is applied as described in Data register, data alignment and offset (ADC_DR, ADC_JDRy, OFFSETy, OFFSETy_CH, OVSS, LSHIFT, JOVSS, JLSHIFT (a) , USAT, SSAT, POSOFF)
Bits 15:0 RDATA_MST[15:0] : Regular data of the master ADC.
In dual mode, these bits contain the regular data of the master ADC. Refer to Section 23.4.31: Dual ADC modes .
The data alignment is applied as described in Data register, data alignment and offset (ADC_DR, ADC_JDRy, OFFSETy, OFFSETy_CH, OVSS, LSHIFT, JOVSS, JLSHIFT (a) , USAT, SSAT, POSOFF)
In MDMA=0b11 mode, bits 15:8 contains SLV_ADC_DR[7:0], bits 7:0 contains MST_ADC_DR[7:0].
23.8.4 ADC common regular data register for dual mode (ADCC_CDR2)
Address offset: 0x010
Reset value: 0x0000 0000
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| RDATA_ALT[31:16] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RDATA_ALT[15:0] | |||||||||||||||
| r | r | r | r | r | r | r | r | r | r | r | r | r | r | r | r |
Bits 31:0 RDATA_ALT[31:0] : Regular data of the master/slave alternated ADCs.
In dual mode, these bits contain the regular 32-bit data of the master and the slave ADC. Refer to Section 23.4.31: Dual ADC modes .
The data alignment is applied as described in Data register, data alignment and offset (ADC_DR, ADC_JDRy, OFFSETy, OFFSETy_CH, OVSS, LSHIFT, JOVSS, JLSHIFT (a) , USAT, SSAT, POSOFF)
23.9 ADC register map
ADC1 and ADC2 are master and slave ADC, respectively.
Table 221. ADC register map and reset values for each ADC
| Offset | Register name reset value | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0x000 | ADC_ISR | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | LDORDY | Res. | JQOVF | AWD3 | AWD2 | AWD1 | JEOS | JEOC | OVR | EOS | EOC | EOSMP | ADRDY |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Table 221. ADC register map and reset values for each ADC (continued)
| Offset | Register name reset value | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0x004 | ADC_IER | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | LDORDYIE | Res. | Res. | JQOVFIE | AWD3IE | AWD2IE | AWD1IE | JEOSIE | JEOCIE | OVRIE | EOSIE | EOCIE | EOSMPIE | ADRDYIE | ||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||
| 0x008 | ADC_CR | ADCAL | Res. | DEEPPWD | ADVREGEN | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | JADSTP | ADSTP | JADSTART | ADSTART | ADDIS | ADEN | |||
| Reset value | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||
| 0x00C | ADC_CFGR1 | JQDIS | Res. | Res. | AWD1CH[4:0] | JAUTO | JAWD1EN | AWD1EN | AWD1SGL | JQM | JDISCEN | DISCNUM[2:0] | DISCEN | Res. | AUTDLY | CONT | OVRMOD | EXTEN[1:0] | EXTSEL[4:0] | Res. | RES[1:0] | DMNGT[1:0] | ||||||||||||||
| Reset value | 0x8000 0000 | |||||||||||||||||||||||||||||||||||
| 0x010 | ADC_CFGR2 | Res. | LSHIFT[3:0] | Res. | Res. | OVSR[9:0] | SMPTRIG | SWTRIG | BULB | Res. | Res. | ROMVSM | TROVS | OVSS[3:0] | Res. | Res. | Res. | ROVSE | ||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||
| 0x014 | ADC_SMPR1 | Res. | Res. | Res. | SMP9[2:0] | SMP8[2:0] | SMP7[2:0] | SMP6[2:0] | SMP5[2:0] | SMP4[2:0] | SMP3[2:0] | SMP2[2:0] | SMP1[2:0] | SMP0[2:0] | ||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||
| 0x018 | ADC_SMPR2 | Res. | Res. | Res. | Res. | Res. | SMP18[2:0] | SMP17[2:0] | SMP16[2:0] | SMP15[2:0] | SMP14[2:0] | SMP13[2:0] | SMP12[2:0] | SMP11[2:0] | SMP10[2:0] | |||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||
| 0x01C | ADC_PCSEL | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | PCSEL[18:0] | |||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||
| 0x020- 0x02C | Reserved | |||||||||||||||||||||||||||||||||||
| 0x030 | ADC_SQR1 | Res. | Res. | Res. | SQ4[4:0] | Res. | SQ3[4:0] | Res. | SQ2[4:0] | Res. | SQ1[4:0] | Res. | LEN[3:0] | |||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||
| 0x034 | ADC_SQR2 | Res. | Res. | Res. | SQ9[4:0] | Res. | SQ8[4:0] | Res. | SQ7[4:0] | Res. | SQ6[4:0] | Res. | SQ5[4:0] | |||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||
| 0x038 | ADC_SQR3 | Res. | Res. | Res. | SQ14[4:0] | Res. | SQ13[4:0] | Res. | SQ12[4:0] | Res. | SQ11[4:0] | Res. | SQ10[4:0] | |||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||
| 0x03C | ADC_SQR4 | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | SQ16[4:0] | Res. | SQ15[4:0] | ||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||||||||||||
| 0x040 | ADC_DR | RDATA[31:0] | ||||||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||
| 0x044- 0x048 | Reserved | |||||||||||||||||||||||||||||||||||
| 0x04C | ADC_JSQR | Res. | Res. | Res. | JSQ4[4:0] | Res. | JSQ3[4:0] | Res. | JSQ2[4:0] | Res. | JSQ1[4:0] | JEXTEN[1:0] | JEXTSEL[4:0] | JLEN[1:0] | ||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||
Table 221. ADC register map and reset values for each ADC (continued)
| Offset | Register name reset value | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0x050 | ADC_OFCFG1 | OFFSET1_CH[4:0] | SSAT | USAT | POSOF | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | ||||
| Reset value | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||||
| 0x054 | ADC_OFCFG2 | OFFSET2_CH[4:0] | SSAT | USAT | POSOF | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | ||||
| Reset value | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||||
| 0x058 | ADC_OFCFG3 | OFFSET3_CH[4:0] | SSAT | USAT | POSOF | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | ||||
| Reset value | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||||
| 0x05C | ADC_OFCFG4 | OFFSET4_CH[4:0] | SSAT | USAT | POSOF | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | ||||
| Reset value | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||||
| 0x060 | ADC_OFR1 | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | OFFSET[21:0] | |||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||
| 0x064 | ADC_OFR2 | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | OFFSET[21:0] | |||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||
| 0x068 | ADC_OFR3 | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | OFFSET[21:0] | |||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||
| 0x06C | ADC_OFR4 | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | OFFSET[21:0] | |||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||
| 0x070 | ADC_GCOMP | GCOMP | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | Res. | GCOMPCOEFF[13:0] | |||||||||||||
| Reset value | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||
| 0x074-0x07C | Reserved | ||||||||||||||||||||||||||||||||
| 0x080 | ADC_JDR1 | JDATA[31:0] | |||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||
| 0x084 | ADC_JDR2 | JDATA[31:0] | |||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||
| 0x088 | ADC_JDR3 | JDATA[31:0] | |||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||
| 0x08C | ADC_JDR4 | JDATA[31:0] | |||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||
| 0x090-0x09C | Reserved | ||||||||||||||||||||||||||||||||
Table 221. ADC register map and reset values for each ADC (continued)
| Offset | Register name reset value | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0x0A0 | ADC_AWD2CR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | AWDCH[18:0] | |||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||
| 0x0A4 | ADC_AWD3CR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | AWDCH[18:0] | |||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||||||
| 0x0A8 | ADC_AWD1LTR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | LTR[22:0] | |||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||
| 0x0AC | ADC_AWD1HTR | AWDFILT [2:0] | Res | Res | Res | Res | Res | Res | Res | Res | Res | HTR[22:0] | |||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | |||||||||
| 0x0B0 | ADC_AWD2LTR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | LTR[22:0] | |||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||
| 0x0B4 | ADC_AWD2HTR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | HTR[22:0] | |||||||||||||||||||||
| Reset value | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | ||||||||||||
| 0x0B8 | ADC_AWD3LTR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | LTR[22:0] | |||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||||||||||||
| 0x0BC | ADC_AWD3HTR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | HTR[22:0] | |||||||||||||||||||||
| Reset value | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | ||||||||||||
| 0x0C0 | Reserved | ||||||||||||||||||||||||||||||||
| 0x0C4 | ADC_CALFACT | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | CALFACT[6:0] | |||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||
| 0x0C8- 0x0CC | Reserved | ||||||||||||||||||||||||||||||||
| 0x0D0 | ADC_OR | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res | Res |
| Reset value | |||||||||||||||||||||||||||||||||
| 0x0D4- 0x0FC | Reserved | ||||||||||||||||||||||||||||||||
Table 222. ADC register map and reset values (master and slave ADC common registers)
| Offset | Register name reset value | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0x000 | ADCC_CSR | Res | Res | Res | LDORDY_SLV | Res | JQOVF_SLV | AWD3_SLV | AWD2_SLV | AWD1_SLV | JEOS_SLV | JEOC_SLV | OVR_SLV | EOS_SLV | EOC_SLV | EOSMP_SLV | ADRDY_SLV | Res | Res | Res | LDORDY_MST | Res | JQOVF_MST | AWD3_MST | AWD2_MST | AWD1_MST | JEOS_MST | JEOC_MST | OVR_MST | EOS_MST | EOC_MST | EOSMP_MST | |
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||
| 0x004 | Reserved | Res | |||||||||||||||||||||||||||||||
| 0x008 | ADCC_CCR | Res | Res | Res | Res | Res | Res | Res | VBATEN | TSEN | VREFEN | Res | Res | DAMDF[1:0] | Res | Res | Res | DELAY[3:0] | Res | Res | Res | DUAL[4:0] | |||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||
| 0x00C | ADCC_CDR | RDATA_SLV[15:0] | |||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||
| 0x010 | ADCC_CDR2 | RDATA_ALT[31:0] | |||||||||||||||||||||||||||||||
| Reset value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||
| 0x014 | Reserved | ||||||||||||||||||||||||||||||||
Refer to Section 2.3: Memory organization for the register boundary addresses.