12. Analog digital converter (ADC)

The STM32WB07xC and STM32WB06xC embed a 12-bit ADC. The ADC consists of a 12-bit successive approximation analog-to-digital converter (SAR) with 2 x 8 multiplexed channels allowing measurements of up to eight external sources and up to two internal sources.

12.1 Features

12.2 ADC presentation

Figure 22. ADC top level diagram shows the top level diagram of the ADC.

The analog ADC can be configured to interface with the following inputs:

Figure 22. ADC top level diagram

ADC top level diagram showing internal architecture and external connections.

The diagram illustrates the internal architecture of the ADC. On the left, external inputs include VBAT, TEMP SENSOR, ADC_VINPx, and ADC_VINMx. A Microphone Interface with a PGA takes VBIAS_MIC and VIN_MIC as inputs. These signals are routed through a Muxing block to a SAR ADC 12bits. The SAR ADC output (12 bits) passes through an ADC Offset Correction and Bit inversion block. From there, the data path splits: one path goes through a U2S block to a Decimation Filter and then to an S2U block; the other path goes through a Down Sampler (16 bits) to the ADC WATCHDOG. Both paths then enter the ADC CONTROLLER. The controller contains several registers: CONF REG, CONTROL REG, WD TRIG REG, INT REG, and STATUS REG, as well as a WD Block and a Sequencer Block. The controller is connected to an APB MEMORY PORT, which in turn connects to an APB bus. The APB bus is connected to a CPU (INT to CPU) and to DMA to RAM (To/from CPU Or DMA to RAM). A legend indicates that orange boxes represent the Digital ADC Subsystem and blue boxes represent the Analog ADC Subsystem.

ADC top level diagram showing internal architecture and external connections.

In parallel of the analog ADC, a digital microphone can be supported (PDM interface through two GPIOs).

The input of the data path can come from:

The conversion data path can go through:

The existence of those two different data paths allows some concurrent conversion (specific combinations).

Caution: Do not change the configuration registers related to the function in use. Any change done by the user on the different bits are applied immediately, with an immediate effect on the on-going process (conversion, decimator filter or downsampler). This action can lead to unexpected results.

For VBAT < 2.7 V, the IO booster needs to be activated to maintain linearity.

12.2.1 Programmable gain amplifier (PGA)

The input signal coming from the analog microphone is amplified with a programmable gain amplifier (PGA) (see Figure 23. Microphone setup) from 0 dB to 30 dB by step of 3 dB.

The signal is then filtered by a low-pass filter with -1 dB at 20 kHz.

The PGA output voltage is 1.2 V and is inverted versus the VIN_MIC input signal.

Figure 23. Microphone setup

Circuit diagram of microphone setup showing a microphone connected via a coupling capacitor Cin to the PGA_VIN (PB4) pin of a PGA interface. The interface also includes VBIAS_MIC (PB5) for microphone power, VCMDEC (PB2) and XVBAT (PB3) pins connected to 100nF capacitors. The PGA is an op-amp configuration with a 100kΩ resistor and variable feedback resistors for gain control, outputting VOUT to ADC.
graph LR
    MIC((MIC)) --|Cin| PGA_VIN
    VBIAS_MIC -- 0.5 to 0.9 x VBAT --> MIC
    subgraph PGA_interface
        PGA_VIN(PGA_VIN PB4) --- R1[100kΩ]
        R1 --- OP_IN_POS[+]
        VCMDEC(VCMDEC PB2) --- C1[100nF]
        XVBAT(XVBAT PB3) --- C2[100nF]
        C1 --- GND
        C2 --- GND
        OP_IN_NEG[-] --- VCM
        OP_OUT[VOUT to ADC]
    end
Circuit diagram of microphone setup showing a microphone connected via a coupling capacitor Cin to the PGA_VIN (PB4) pin of a PGA interface. The interface also includes VBIAS_MIC (PB5) for microphone power, VCMDEC (PB2) and XVBAT (PB3) pins connected to 100nF capacitors. The PGA is an op-amp configuration with a 100kΩ resistor and variable feedback resistors for gain control, outputting VOUT to ADC.

VBIAS_MIC, whose function is independent of PGA_VIN, is used as the microphone power supply. In order to accommodate different microphone supply specifications with a battery that could vary between 1.7 V and 3.6 V, VBIAS_MIC voltage is adjustable as a ratio of VBAT, between 0.5 and 0.9. Refer to the section on PGA_CONF registers for details.

100 nF capacitors need to be connected to VCMDEC and XVBAT respectively to filter out the noise above 1 kHz.

PGA_VIN has a typical input common-mode voltage, VCM, of 750 mV. In order to avoid DC conflicts which could cause saturation in the PGA, a coupling capacitor, Cin, needs to be connected between the microphone and PGA_VIN. The recommended value is 1 µF but one could use a lower value (see Table 30. PGA parameters ). The smaller the capacitor, the quicker the start-up time but with the drawback of the input signal being attenuated. For example, with a Cin of 10 nF a 1 kHz signal would be attenuated by approximately 1 dB.

The PGA gain is adjustable between 0 dB and 30 dB in steps of 3 dB (see Section 12.6.5: ADC PGA configuration register (PGA_CONF) ). In order to avoid distortion in the PGA, the gain setting would need to be adjusted in accordance with the microphone output peak voltage. Below are the PGA maximum output peak voltage values to be respected along with the formula for estimating the maximum PGA gain with respect to the microphone sensitivity, S 0 .

Table 30. PGA parameters

ParameterSymbolMin.Typ.UnitsRemarks
CinCin0.11µF1 µF is recommended
PGA Max VoutMxVout-6.8-5.8dBVpkTyp. at 25 °C; Min. at 105 °C

Note: \( \text{Maximum PGA gain in dB} = \text{MxVout} - S_0 - 3 \) [N.B. Sensitivity for analog mics are in dBVrms]

Note: E.g. With the microphone sensitivity = -38 dB in a typical setting and no attenuation in the input signal: \( \text{Maximum PGA gain} = -5.8 + 38 - 3 = 29.2 \text{ dB} \) .

Note: The usage of the PGA in analog audio mode implies connecting 3 external capacitors on PB2/PB3/PB4 I/Os. The user has to ensure that the analog switch is well configured to select the PGA external capacitor mode (see Section 8.2.11: I/O analog switch control register (GPIO_SWA_CTRL) for details) and then that those two pads are programmed in analog mode (see Section 7.4.1: GPIO port mode register (GPIOx_MODER) (x = A, B) for details) in this order. A filter needs to be added to the output of the decimation filter in order to filter out the DC level.

12.2.2 Temperature sensor subsystem

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.

The temperature sensor needs to be enabled through the PWRC_CR2.ENTS bit.

The temperature sensor measurement conversion is on the input range 0 to 1.2 V as the temperature range is:

The temperature sensor output voltage changes linearly with temperature. The offset of this line varies from chip-to-chip due to process variation. 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. In this way the temperature can be calculated with this formula:

\[ \text{Temperature in Celsius} = \frac{55}{(C85 - C30)} \cdot [C_{meas} - C30] + 30 \quad (1) \]

Where:

C85 is the temperature sensor calibration value acquired at \( 85\text{ }^\circ\text{C} \) readable @0x10001E68.

C30 is the temperature sensor calibration value acquired at \( 30\text{ }^\circ\text{C} \) readable @0x10001E60.

Cmeas is the actual temperature sensor output value converted by ADC.

Note: ADC gain calibration for VINPx range 1.2 V only must be applied. Offset calibration must be 0 (not used).

Note: Refer to Section 25.1: DESIG registers for information about the location where these calibration values are stored.

12.2.3 Battery sensor

The battery sensor can be used to measure the internal battery voltage of the device. The battery input is internally connected to the ADC input channels which are used to convert the sensor output voltage to a digital value.

The battery sensor range is up to 3.6 V.

The formula for ADC converted data after calibration is the following:

Code = Integer(4096/3.6 * VIN) [clamped at 4095]

As calibration points the VBAT is considered as single negative input with 3.6 V range.

Note: Refer to Section 25.1: DESIG registers for information about the location where these calibration values are stored.

12.2.4 ADC input mode conversion

The ADC is designed to deliver a digital value corresponding to the ratio between the analog power supply and the voltage applied on the converted channel. For most application use cases, it is necessary to convert this ratio into a voltage independent of VDDA.

The formula for ADC digital converted data after calibration and offset is the following:

12.2.5 Calibration points

Calibration values are stored in the system memory for each device by ST during production. Each value consists of a 12-bit unsigned value for the gain and an 8-bit signed value for the offset as follows:

OFFSET[18:12] | GAIN[11:0]

These values can be written inside the registers COMP_x with x=1, 2, 3, 4 to apply a point to a particular ADC input. The COMP_SEL register allows a specific calibration point to be associated to one of the ADC inputs.

The offset value can be written inside the COMP_x register only if it fits in the 7-bit of register field, that means offset is in [-64, 63]. Otherwise, it can be removed by the output raw data manually as raw_value + offset.

The negative offset values need to be converted as:

offset | 0x80, if the bitfield BIT_INVERT_SN=1 (default value).

Below the list of the calibration points and their location in the system memory.

Table 31. Calibration points

Calibration pointAddress location
VINPx - VINMx range 1.2 V0x10001E00
VINMx range 1.2 V0x10001E04
VINPx range 1.2 V0x10001E08
VINPx - VINMx range 2.4 V0x10001E0C
VINMx range 2.4 V0x10001E10
VINPx range 2.4 V0x10001E14
VINPx - VINMx range 3.6 V0x10001E18
VINMx range 3.6 V0x10001E1C
VINPx range 3.6 V0x10001E20

Note: Previous version of the calibration points has the offset in 7-bit signed. This version can be recognized as the user can read at address 0x10001EFC the value 0.

Note: Refer to Section Section 25.1: DESIG registers for information about the location where these calibration values are stored.

12.2.6 Steady-state input impedance

As the input nature of the ADC is a switched-capacitor, its steady-state input impedance is defined as the impedance seen in DC. It depends only on the analog sampling frequency, Fs, and the input capacitor, Cin: \( Z_{in} = 1/(C_{in} \cdot F_s) \) .

12.2.7 Input signal sampling transient response

As represented in Figure 25. Effect of analog source resistance , the analog signal path consists of a series resistance (Rext) between source and pin, the internal switch resistor (Rin) and the internal sampling capacitor (Cin). The charging of the capacitor is controlled by Rin. When there is Rext in series, the effective value of charging of Cin is governed by Rin+Rext. So the charging time constant becomes (Rin+Rext)*Cin and the necessary time to reach a given accuracy is longer. The ADC has a fixed sampling time Tsw depending on ADC frequency which is 1/Ts as shown in Figure 24. ADC sampling time Tsw and sampling period Ts .

Figure 24. ADC sampling time Tsw and sampling period Ts

Timing diagram showing a square wave. The sampling time Tsw is 125ns, indicated by a short double-headed arrow. The sampling period Ts is 1us, indicated by a longer double-headed arrow spanning one full cycle of the square wave.
Timing diagram showing a square wave. The sampling time Tsw is 125ns, indicated by a short double-headed arrow. The sampling period Ts is 1us, indicated by a longer double-headed arrow spanning one full cycle of the square wave.

Figure 25. Effect of analog source resistance

Circuit diagram illustrating the effect of analog source resistance. An AC voltage source Vin is connected to an external resistor Rext. This is followed by the AUXADC Interface, which contains an internal resistor Rin, a sampling switch (labeled Tsw=125ns), and an internal capacitor Cin connected to ground. The voltage across the capacitor is Vs.
Circuit diagram illustrating the effect of analog source resistance. An AC voltage source Vin is connected to an external resistor Rext. This is followed by the AUXADC Interface, which contains an internal resistor Rin, a sampling switch (labeled Tsw=125ns), and an internal capacitor Cin connected to ground. The voltage across the capacitor is Vs.

Knowing that: \( R_{in}=550\ \Omega \) , \( C_{in}=4\ pF \) , and imposing a maximum sampling error of 1/2 bits, we can determine the maximum input resistance as below:

\[ \epsilon = (V_s - V_{in})/V_{in} = -e^{-t/RC} \]

\[ \ln|\epsilon| \leq t/(R_{ext}+R_{in}) \cdot C_{in} \]

\[ (R_{ext}+R_{in}) \cdot C_{in} \leq t / \ln|\epsilon| \]

\[ (R_{ext}+R_{in}) \cdot C_{in} \leq 125e-9 / \ln(122e-6) \]

\[ (R_{ext}+R_{in}) \cdot C_{in} \leq 14\ ns \]

\[ R_{ext} \leq 14\ ns/4\ pF - 550\ \Omega \]

\[ R_{ext} \leq 2950\ \Omega \]

where:

\[ |\epsilon| \leq 1/2^{13} \]

\[ |\epsilon| \leq 122e-6 \]

12.2.8 Decimation filter (DF)

The purpose of the decimation filter (DF) is to provide a way to reduce the incoming fixed rate sample to some fixed output data rates, while improving the overall noise performance (signal to noise ratio).

The decimation filter is used to process either the PDM data stream from a digital MEMS microphone or from the output of the 12-bit ADC, mainly targeting the audio sources of signal.

The input data rate of the decimation filter is:

The FIR filter has a fixed decimation rate of 3

Figure 26. Simplified decimation filter block diagram

Simplified decimation filter block diagram showing an input frequency F entering a Flexible Decimation Factor CIC Filter, resulting in frequency F/(M/3), followed by a Decimation by 3 FIR filter, resulting in a final output frequency F/M. The overall decimation factor is M.
graph LR
    Input[input F] --> CIC[Flexible Decimation Factor CIC Filter]
    CIC --> Intermediate["F/(M/3)"]
    Intermediate --> FIR[Decimation by 3 FIR filter]
    FIR --> Output[data F/M]
    subgraph Decimation Factor=M
    CIC
    FIR
    end
Simplified decimation filter block diagram showing an input frequency F entering a Flexible Decimation Factor CIC Filter, resulting in frequency F/(M/3), followed by a Decimation by 3 FIR filter, resulting in a final output frequency F/M. The overall decimation factor is M.

Table 32. Output data rate with ADC input at 1 MHz for analog mode and Table 33. CIC filter output frequency with digital microphone input list the decimation factors and the output frequencies according to the supported inputs (ADC or digital microphone).

The relationship between input data rate and output data rate is that the input data rate is:

Note: This divider by 2 is too noisy for digital audio scenario; to be kept for analog scenarios only.

Table 32. Output data rate with ADC input at 1 MHz for analog mode

Target frequencyDF_CIC_DEC_FACTORDF_CIC_DHF (freq / 2)DF_ITP1P2 (freq x 1.2)Output frequencyError
8 kHz42007.936 kHz0.79 %
16 kHz210015.873 kHz0.79 %
200 kHz (1)201200 kHz0 %
44.1 kHz (2)141044.444 kHz0.78 %
48 kHz (2)70047.619 kHz0.79 %
22.05 kHz (2)150022.222 kHz0.78 %

1. The 200 kHz use-case is not supposed to be used for the analog audio scenario. It mainly targets sensor measurements.

2. This is a possible configuration but neither verified nor guaranteed (to be validated in lab).

Note: A constraint on the ratio between APB system clock (F PCLK ) and the output data rate (DR out ) must be respected:

Example: F PCLK must be at least 2 MHz to have a DR out = 200 kHz.

If the DMA is not used to get the data output by the decimation filter path, the CPU needs to be clocked at a frequency ratio high enough (taking into account bus matrix latency) to avoid missing samples.

Table 33. CIC filter output frequency with digital microphone input

Division ratio from 32 MHz clockDigital microphone frequencyMCICTarget frequencyOutput frequencyError
162 MHz848 kHz7.936 kHz0.79 %
Division ratio from 32 MHz clockDigital microphone frequencyMCICTarget frequencyOutput frequencyError
162 MHz4216 kHz15.873 kHz0.79 %
162 MHz3022.05 kHz22.22 kHz0.78 %
162 MHz1544.1 kHz44.44 kHz0.78 %
162 MHz1448 kHz47.619 kHz0.79 %

Table 34. Minimum decimation factor for the CIC / total versus pdm_rate provides the value of the allowable minimum decimation factor for the CIC filter and for the complete chain versus the pdm_rate input parameter.

Table 34. Minimum decimation factor for the CIC / total versus pdm_rate

pdm_rateDecimation filter input rateMinimum allowed decimation factor CIC / total
03.2 MHz5 / 15
12.91 MHz5 / 15
22.66 MHz5 / 15
32.46 MHz4 / 12
42.28 MHz4 / 12
52.13 MHz4 / 12
62.00 MHz4 / 12
71.88 MHz3 / 9
81.78 MHz3 / 9
91.68 MHz3 / 9
101.60 MHz3 / 9
111.52 MHz3 / 9
121.46 MHz3 / 9
131.40 MHz3 / 9
141.33 MHz3 / 9
151.28 MHz2 / 6

When the input of the decimation filter comes from 12-bit ADC, an unsigned-to-signed data conversion is possible through a configuration bit (DF_I_U2S bit in DF_CONF register).

The output of the decimation filter can also be converted from signed to unsigned through a configuration bit (DF_O_S2U bit in DF_CONF register) to be compatible with the down sampler output which is always signed.

The input PDM data is sampled either on the falling edge or the rising edge of the PDM clock. This is configurable through DF_MICRO_L_RN bit in the DF_CONF register. The PDM clock is generated by a division of the decimation filter clock (always 32 MHz) according to the targeted output frequency.

12.2.9 Down sampler (DS)

This down sampler is a simple averaging filter, which can divide the ADC frequency by 1 to 128 by power of 2. The goal is to handle multiple ADC samples and average them into a single data with increased data width ranging from 12-bit to 16-bit.

The down sampler increases the data precision but reduces the output data rate.

Note: A constraint on the ratio between APB system clock ( \( F_{PCLK} \) ) and the output data rate ( \( DR_{out} \) ) must be respected:

Example: \( F_{PCLK} \) must be at least 2 MHz to have a \( DR_{out} = 500 \) kHz.

If the DMA is not used to get the data output by the down sampler filter path, the CPU needs to be clocked at a frequency ratio high enough (taking into account bus matrix latency) to avoid missing samples.

12.3 Interrupts

There are 6 maskable interrupts generated by the ADC block. These interrupts are combined to produce one single interrupt output, which is the only interrupt line from the ADC to the CPU.

Table 35. ADC interrupt requests

Interrupt eventEvent flagInterrupt / flag clearing methodInterrupt enable control bit
Down sampler end of conversionEODS_IRQWrite 1 on EODS_IRQ bitEODS_IRQ_ENA
Decimation filter end of conversionEODF_IRQWrite 1 on EODF_IRQ bitEODF_IRQ_ENA
End of conversion sequenceEOS_IRQWrite 1 on EOS_IRQ bitEOS_IRQ_ENA
Analog watchdog eventAWD_IRQWrite 1 on AWD_IRQ bitAWD_IRQ_ENA
Down sampler overrunOVR_DS_IRQWrite 1 on OVR_DS_IRQ bitOVR_DS_IRQ_ENA
Decimation filter overrunOVR_DF_IRQWrite 1 on OVR_DF_IRQ bitOVR_DF_IRQ_ENA

12.4 DMA interface

The ADC has two DMA channels interface:

The DMA feature is enabled by software through CONF register respectively by DMA_DS_ENA bit for down sampler data output and DMA_DF_ENA bit for decimation filter data output.

When DMA feature is disabled for one or both output, the data can be read by the CPU through the corresponding APB register.

12.5 ADC modes

Table 36. ADC mode summary provides an overview of the different supported modes.

Table 36. ADC mode summary

ModeInput signalDF or DSContinuous or singlePossible concurrent mode
Analog audioAnalog microphoneDFContinuousOccasional
Digital audioDigital GPIO (PDM_DATA)DFContinuousADC
ADC
  • 8 single external channels (or 4 when coupled as differential)
  • VBAT
  • Temperature sensor
DSContinuous or singleDigital audio
Full
  • 8 single external channels (or 4 when coupled as differential)
  • VBAT
  • Temperature sensor
DFContinuousOccasional
Occasional
  • VBAT
  • Temperature sensor
DSSingle
  • Full
  • Analog audio

12.5.1 Analog audio mode

Presentation

The Analog audio mode has the following characteristics:

Analog audio mode usage

This paragraph describes the process to use the analog audio mode:

Caution: This LDO enable bit must not be set when VFQFPN32 devices are used because the VDDA pin used to supply the ADC LDO is not available on this package.

Note: If the CPU does not manage to get the converted data before a new converted data is generated, the OVR_DF_IRQ flag is raised to inform a data has been lost. The software can program the hardware behavior in case of overrun through the OVR_DF_CFG bit in CONF register:

12.5.2 ADC mode

Presentation

The ADC mode has the following characteristics:

ADC mode usage

This paragraph describes the process to use the ADC mode:

Note: This LDO enable bit must not be set when VFQFPN32 devices are used because the VDDA pin used to supply the ADC LDO is not available on this package.

To have more than one conversion, ensure the bit SEQUENCE is well at 1 in CONF register.

Note: If the CPU does not manage to get the converted data before a new converted data is generated, the OVR_DS_IRQ flag is raised to inform a data has been lost. The software can program the hardware behavior in case of overrun through the OVR_DS_CFG bit in CONF register:

12.5.3 Digital audio mode

Presentation

The digital audio mode aims to interconnect with an external digital MEMS microphone. The digital audio mode has the following characteristics:

Digital audio mode usage

This paragraph describes the process to use the digital audio mode:

Note: The first filtered data is available after a delay depending on the latency of the filter (according to the decimation factor) to guarantee the first issued value is correct.

Note: If the CPU does not manage to get the converted data before a new converted data is generated, the OVR_DF_IRQ flag is raised to inform a data has been lost.

Note: The software can program the hardware behavior in case of overrun through the OVR_DF_CFG bit in CONF register:

12.5.4 Full mode

Presentation

The full mode is the same mode as the analog audio mode but with the other analog channels than the audio PGA interface.

The full mode has the following characteristics:

Full mode usage

This paragraph describes the process to use the full mode:

Note: This LDO enable bit must not be set when VFQFPN32 devices are used because the VDDA pin used to supply the ADC LDO is not available on this package.

Note: If the CPU does not manage to get the converted data before a new converted data is generated, the OVR_DF_IRQ flag is raised to inform a data has been lost.

Note: The software can program the hardware behavior in case of overrun through the OVR_DF_CFG bit in CONF register:

12.5.5 Occasional mode

Presentation

The occasional mode has the following characteristics:

Occasional usage

This paragraph describes the process to use the occasional mode:

12.5.6 Concurrent functions

Some modes support having concurrent conversions:

In this case the data are available in DF_DATAOUT and/or in DS_DATAOUT registers, depending on the selected concurrent modes.

Note: Audio analog mode, full mode and occasional mode use a common hardware resource (12-bit ADC block). Furthermore, the audio analog mode and the full mode are continuous. So when the occasional mode is used in concurrent mode, they lose one conversion. In this configuration, the hardware keeps the previous data on lost conversion.

12.6 ADC registers

12.6.1 Version register (VERSION_ID)

Address offset: 0x00

Reset value: 0x0000 0020

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.VERSION_ID[7:0]
r
Bits 31:8Reserved, must be kept at reset value.
Bit 7:0VERSION_ID[7:0] : Version of the embedded IP.

12.6.2 ADC configuration register (CONF)

Address offset: 0x04

Reset value: 0x0002 0002

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.VBIAS_PRECH_FORCEADC_CONT_1V2BIT_INVERT_DIFFBIT_INVERT_SNOVR_DF_CFG
rrrrr
1514131211109876543210
OVR_DS_CFGDMA_DF_ENADMA_DS_ENASAMPLE_RATE[1:0]Res.Res.OP_MODE[1:0]SMPS_SYNCHRO_ENASEQ_LEN[3:0]SEQUENCECONT
rrrrrrrrrrrrr
1514131211109876543210
Bits 31:21Reserved, must be kept at reset value.
Bit 20VBIAS_PRECH_FORCE : Possibility to keep the VBIAS_PRECH enabled to deactivate the filter (in case power supply is clean enough):
  • 0: VBIAS_PRECH signal is controlled by the ADC digital state machine (default)
  • 1: VBIAS_PRECH signal is set permanently to 1
Bit 19ADC_CONT_1V2 : Select the input sampling method:
  • 0: Sampling only at conversion start (default)
  • 1: Sampling starts at the end of conversion
Bit 18BIT_INVERT_DIFF : Invert bit-to-bit the ADC data output (1's complement) when a differential input is connected to the ADC:
  • 0: No inversion (default)
  • 1: Enable the inversion
Bit 17BIT_INVERT_SN : Invert bit-to-bit the ADC data output (1's complement) when a single negative input is connected to the ADC:
  • 0: No inversion
  • 1: Enable the inversion (default)
Bit 16OVR_DF_CFG : Decimation Filter overrun configuration:
  • 0: The previous data is kept, the new one is lost (default)
  • 1: The previous data is lost, the new one is kept
Bit 15OVR_DS_CFG : Down sampler overrun configuration:
  • 0: The previous data is kept, the new one is lost (default)
  • 1: The previous data is lost, the new one is kept
Bit 14DMA_DF_EN : Enable the DMA mode for the decimation filter data path:
  • 0: DMA mode is disabled
  • 1: DMA mode is enabled
Bit 13DMA_DS_EN: Enable the DMA mode for the down sampler data path:
  • • 0: DMA mode is disabled
  • • 1: DMA mode is enabled
Bits 12:11SAMPLE_RATE[1:0]: Conversion rate of ADC:
  • – 00: 16 (= 1 Msp/s)
  • – 01: 20 (= 800 ksp/s)
  • – 10: 24(= 667 ksp/s)
  • – 11: 28 (= 571 ksp/s)
Bits 10:9Reserved, must be kept at reset value.
Bits 8:7OP_MODE[1:0]: ADC mode selection (=data path selection):
  • • 00: Reserved for future used
  • • 01: Analog audio mode (PGAON)
  • • 10: ADC mode
  • • 11: Full mode
Bit 6SMPS_SYNCHRO_ENA: Synchronize the ADC start conversion with a pulse generated by the SMPS:
  • • 0: SMPS synchronization is disabled for all ADC clock frequencies
  • • 1: SMPS synchronization is enabled
Note: SMPS_SYNCHRO_ENA must be 0 when PWRC_CR5.NOSMPS=1.
Bits 5:2SEQ_LEN[3:0]: Number of conversions in a regular sequence:
  • • 0000: 1 conversion, starting from SEQ 0
  • • 0001: 2 conversions, starting from SEQ 0
  • – ...
  • • 1111: 16 conversions, starting from SEQ 0
Bit 1SEQUENCE: Enable the sequence mode (active by default):
  • • 0: Sequence mode is disabled, only SEQ0 is selected
  • • 1: Sequence mode is enabled, conversions from SEQ0 to SEQx with x=SEQ_LEN (default)
Note: Clearing this bit is equivalent to SEQUENCE=1 and SEQ_LEN=0000. Ideally, this bit can be kept high as redundant with keeping high and setting SEQ_LEN=0000.
Bit 0CONT: Regular sequence runs continuously when ADC mode is enabled:
  • • 0: Enable the single conversion: when the sequence is over, the conversion stops
  • • 1: Enable the continuous conversion: when the sequence is over, the sequence starts again until the software sets the CTRL.STOP_OP_MODE bit

12.6.3 ADC control register (CTRL)

Address offset: 0x08

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.ADC_LDO_ENARes.DIG_AUD_MODESTOP_OP_MODESTART_CONVADC_ON_OFF
rWrWrWttrW
Bits 31:6Reserved, must be kept at reset value.
Bit 5ADC_LDO_ENA: Enable the LDO associated to the ADC block:
  • 0: Disable the ADCLDO
  • 1: Enable the ADCLDO
Warning: This bit must not be set on VFQFPN32 packages.
Bit 4Reserved, must be kept at reset value.
Bit 3DIG_AUD_MODE: Enable the digital audio mode (the data path uses the decimation filter):
  • 0: Stop digital audio mode
  • 1: Start digital audio mode
Bit 2STOP_OP_MODE (1) : Stop the on-going OP_MODE (ADC mode, Analog audio mode, Full mode):
  • 0: No effect
  • 1: Stop on-going ADC mode
Note: This bit is set by software and cleared by hardware.
Bit 1START_CONV (1) : Generates a start pulse to initiate an ADC conversion:
  • 0: No effect
  • 1: Start the ADC conversion
Note: This bit is set by software and cleared by hardware.
Bit 0ADC_ON_OFF:
  • 0: Power off the ADC
  • 1: Power on the ADC

1. When setting the STOP_MODE_OP, the user has to wait around 10 µs before starting a new ADC conversion by setting the START_CONV bit.

12.6.4 ADC occasional mode control register (OCM_CTRL)

Address offset: 0x0C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.OCM_ENAOCM_SRC
trw
Bits 31:2Reserved, must be kept at reset value.
Bit 1OCM_ENA: Start occasional conversion in analog audio and full modes:
  • 0: No effect
  • 1: Start occasional conversion
Note: This bit is set by software and cleared by hardware.
Bit 0OCM_SRC: Select the occasional conversion source
  • 0: VBAT occasional conversion
  • 1: Temperature sensor occasional conversion

12.6.5 ADC PGA configuration register (PGA_CONF)

Address offset: 0x10

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.PGA_BIAS[2:0]PGA_GAIN[3:0]
rwrwrwrwrwrwrw
Bits 31:7Reserved, must be kept at reset value.
Bits 6:4PGA_BIAS[2:0]: Set the microphone bias voltage:
– 000: 0.5 x VBAT
– 001: 0.55 x VBAT
– 010: 0.6 x VBAT
– 011: 0.65 x VBAT
– 100: 0.7 x VBAT
– 101: 0.75 x VBAT
– 110: 0.8 x VBAT
– 111: 0.9 x VBAT
Bits 3:0PGA_GAIN[3:0]: From 0 to 30 dB.
– 0000: 0 dB PGA min. gain, equivalent to the 1.2 V ADC full scale
– 0001: 3 dB
– 0010: 6 dB
– 0011: 9 dB
– 0100: 12 dB
– 0101: 15 dB
– 0110: 18 dB
– 0111: 21 dB
– 1000: 24 dB
– 1001: 27 dB
– 1010 to 1111: 30 dB

12.6.6 ADC input voltage switch selection register (SWITCH)

Address offset: 0x14

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.g Res.Res.g Res.Res.g Res.Res.g Res.Res.g Res.Res.g Res.Res.g Res.Res.g Res.
1514131211109876543210
SE_VIN_7[1:0]SE_VIN_6[1:0]SE_VIN_5[1:0]SE_VIN_4[1:0]SE_VIN_3[1:0]SE_VIN_2[1:0]SE_VIN_1[1:0]SE_VIN_0[1:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:16Reserved, must be kept at reset value.
Bits 15:14SE_VIN_7[1:0] : Input voltage for VINP[3].
  • 00: Vininput = 1.2 V
  • 01: Reserved (not used for this cut)
  • 10: Vininput = 2.4 V
  • 11: Vininput = 3.6 V
Bits 13:12SE_VIN_6[1:0] : Input voltage for VINP[2].
  • 00: Vininput = 1.2 V
  • 01: Reserved (not used for this cut)
  • 10: Vininput = 2.4 V
  • 11: Vininput = 3.6 V
Bits 11:10SE_VIN_5[1:0] : Input voltage for VINP[1].
  • 00: Vininput = 1.2 V
  • 01: Reserved (not used for this cut)
  • 10: Vininput = 2.4 V
  • 11: Vininput = 3.6 V
Bits 9:8SE_VIN_4[1:0] : Input voltage for VINP[0].
  • 00: Vininput = 1.2 V
  • 01: Reserved (not used for this cut)
  • 10: Vininput = 2.4 V
  • 11: Vininput = 3.6 V
Bits 7:6SE_VIN_3[1:0] : Input voltage for VINM[3] / VINP[3]-VINM[3].
  • 00: Vininput = 1.2 V
  • 01: Reserved (not used for this cut)
  • 10: Vininput = 2.4 V
  • 11: Vininput = 3.6 V
Bits 5:4SE_VIN_2[1:0] : Input voltage for VINM[2] / VINP[2]-VINM[2].
  • 00: Vininput = 1.2 V
  • 01: Reserved (not used for this cut)
  • 10: Vininput = 2.4 V
  • 11: Vininput = 3.6 V
Bits 3:2SE_VIN_1[1:0] : Input voltage for VINM[1] / VINP[1]-VINM[1].
  • 00: Vininput = 1.2 V
  • 01: Reserved (not used for this cut)
  • 10: Vininput = 2.4 V
  • 11: Vininput = 3.6 V
Bits 1:0SE_VIN_0[1:0] : Input voltage for VINM[0] / VINP[0]-VINM[0].
  • 00: Vininput = 1.2 V
  • 01: Reserved (not used for this cut)
  • 10: Vininput = 2.4 V
  • 11: Vininput = 3.6 V

12.6.7 Decimation filter configuration register (DF_CONF)

Address offset: 0x18

Reset value: 0x0000 3015

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DF_HALF_D_ENDF_HPF_EN
RRW
1514131211109876543210
DF_MICROL_RNPDM_RATE[3:0]DF_O_S2UDF_I_U2SDF_ITP1P2DF_CIC_DHFDF_CIC_DEC_FACTOR[6:0]
RWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRW
Bits 31:18Reserved, must be kept at reset value.
Bit 17DF_HALF_D_EN: Half dynamic enable.
  • 0: OFF: full dynamic (default)
  • 1: ON: the dynamic is divided by 2 at the input of the decimation filter.
Bit 16DF_HPF_EN: High pass filter enable.
  • 0: OFF (default)
  • 1: ON, the cut-off frequency is 40 Hz.
Bit 15DF_MICROL_RN: Left/right channel selection on digital microphone:
  • 0: right channel selection
  • 1: left channel selection
Bits 14:11PDM_RATE[3:0]: Select the PDM clock rate.
\( PDM\ period = (PDM\_RATE[3:0] + 10) \times 32mhz\_period. \)
  • 0000: PDM frequency = 3.2 MHz
  • – ...
  • 0110: PDM frequency = 2 MHz (default)
  • – ...
  • 1111: PDM frequency = 1.28 MHz
Bit 10DF_O_S2U: Select signed/unsigned format for data output
  • 0: signed (default)
  • 1: unsigned
Bit 9DF_I_U2S: Select signed/unsigned format for input
  • 0: unsigned (default)
  • 1: signed
Bit 8DF_ITP1P2: 1.2 fractional interpolator enable
  • 0: 1.2 interpolator bypassed (default),
  • 1: 1.2 interpolator ON.

Note: This bit must be set only for the generation of a data rate at 200 kps from ADC data at 1 MHz. Unpredictable result may happen if set for other configuration.

Bit 7DF_CIC_DHF: CIC filter decimator half factor
  • 0: integer factor (default),
  • 1: half factor.

Note: This bit must be set only for the generation of a data rate at 44.1 kps from ADC data at 1 MHz. Unpredictable result may happen if set for other configuration.

Bits 6:0

DF_CIC_DEC_FACTOR[6:0]:

MCIC for digital microphone (PDM freq = 2 MHz)

  • • 0x0E: output frequency 47.619 kHz (MCIC = 14)
  • • 0x0F: output frequency 44.44 kHz (MCIC = 15)
  • • 0x1E: output frequency 22.22 kHz (MCIC = 30)
  • • 0x2A: output frequency 15.873 kHz (MCIC = 42)
  • • 0x54: output frequency 7.936 kHz (MCIC = 84)

MCIC for analog microphone (ADC frequency = 1 Mhz):

  • • 0x02: output frequency 200 kHz with DF_ITP1P2 = 1
  • • 0x15: output frequency 15.873 kHz
  • • 0x2A: output frequency 7.936 kHz

12.6.8 Down sampler configuration register (DS_CONF)

Address offset: 0x1C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DS_WIDTH[2:0]DS_RATIO[2:0]
rwrwrwrwrwrw
Bits 31:6Reserved, must be kept at reset value.
Bits 5:3DS_WIDTH[2:0] : Program the down sampler width of data output (DSDATA).
  • 000: DS_DATA output on 12-bit (default)
  • 001: DS_DATA output on 13-bit
  • 010: DS_DATA output on 14-bit
  • 011: DS_DATA output on 15-bit
  • 100: DS_DATA output on 16-bit
  • 1xx: Reserved
Bits 2:0DS_RATIO[2:0] : Program the down sampler ratio (N factor).
  • – 000: Ratio = 1, no down sampling (default)
  • – 001: ratio = 2
  • – 010: ratio = 4
  • – 011: ratio = 8
  • – 100: ratio = 16
  • – 101: ratio = 32
  • – 110: ratio = 64
  • – 111: ratio = 128

12.6.9 ADC sequence programming 1 register (SEQ_1)

Address offset: 0x20

Reset value: 0x0000 0000

31302928272625242322212019181716
SEQ7[3:0]SEQ6[3:0]SEQ5[3:0]SEQ4[3:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
SEQ3[3:0]SEQ2[3:0]SEQ1[3:0]SEQ0[3:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:28SEQ7[3:0] : Channel number code for 8 th conversion of the sequence.
See SEQ0 for code detail.
Bits 27:24SEQ6[3:0] : Channel number code for 7 th conversion of the sequence. See SEQ0 for code detail.
Bits 23:20SEQ5[3:0] : Channel number code for 6 th conversion of the sequence. See SEQ0 for code detail.
Bits 19:16SEQ4[3:0] : Channel number code for 5 th conversion of the sequence. See SEQ0 for code detail.
Bits 15:12SEQ3[3:0] : Channel number code for 4 th conversion of the sequence. See SEQ0 for code detail.
Bits 11:8SEQ2[3:0] : Channel number code for 3 rd conversion of the sequence. See SEQ0 for code detail.
Bits 7:4SEQ1[3:0] : Channel number code for second conversion of the sequence. See SEQ0 for code detail.
Bits 3:0SEQ0[3:0] : Channel number code for first conversion of the sequence
  • 0000: VINM[0] to ADC single negative input
  • 0001: VINM[1] to ADC single negative input
  • 0010: VINM[2] to ADC single negative input
  • 0011: VINM[3] to ADC single negative input
  • 0100: VINP[0] to ADC single positive input
  • 0101: VINP[1] to ADC single positive input
  • 0110: VINP[2] to ADC single positive input
  • 0111: VINP[3] to ADC single positive input
  • 1000: VINP[0]-VINM[0] to ADC differential input
  • 1001: VINP[1]-VINM[1] to ADC differential input
  • 1010: VINP[2]-VINM[2] to ADC differential input
  • 1011: VINP[3]-VINM[3] to ADC differential input
  • 1100: VBAT - battery level detector
  • 1101: Temperature sensor
  • 111x: Reserved

12.6.10 ADC sequence programming 2 register (SEQ_2)

Address offset: 0x24

Reset value: 0x0000 0000

31302928272625242322212019181716
SEQ15[3:0]SEQ14[3:0]SEQ13[3:0]SEQ12[3:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
SEQ11[3:0]SEQ10[3:0]SEQ9[3:0]SEQ8[3:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:28SEQ15[3:0] : Channel number code for 16 th conversion of the sequence. See SEQ8 for code detail.
Bits 27:24SEQ14[3:0] : Channel number code for 15 th conversion of the sequence. See SEQ8 for code detail.
Bits 23:20SEQ13[3:0] : Channel number code for 14 th conversion of the sequence. See SEQ8 for code detail.
Bits 19:16SEQ12[3:0] : Channel number code for 13 th conversion of the sequence. See SEQ8 for code detail.
Bits 15:12SEQ11[3:0] : Channel number code for 12 th conversion of the sequence. See SEQ8 for code detail.
Bits 11:8SEQ10[3:0] : Channel number code for 11 th conversion of the sequence. See SEQ8 for code detail.
Bits 7:4SEQ9[3:0] : Channel number code for 10 th conversion of the sequence. See SEQ8 for code detail.
Bits 3:0SEQ8[3:0] : Channel number code for 9 th conversion of the sequence.
  • 0000: VINM[0] to ADC single negative input
  • 0001: VINM[1] to ADC single negative input
  • 0010: VINM[2] to ADC single negative input
  • 0011: VINM[3] to ADC single negative input
  • 0100: VINP[0] to ADC single positive input
  • 0101: VINP[1] to ADC single positive input
  • 0110: VINP[2] to ADC single positive input
  • 0111: VINP[3] to ADC single positive input
  • 1000: VINP[0]-VINM[0] to ADC differential input
  • 1001: VINP[1]-VINM[1] to ADC differential input
  • 1010: VINP[2]-VINM[2] to ADC differential input
  • 1011: VINP[3]-VINM[3] to ADC differential input
  • 1100: VBAT - battery level detector
  • 1101: Temperature sensor
  • 111x: Reserved

12.6.11 ADC gain and offset correction 1 register (COMP_1)

Address offset: 0x28

Reset value: 0x0000 0555

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.OSFFSET1[6:0]
rwrwrw
1514131211109876543210
OSFFSET1[6:0]GAIN1[11:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:19Reserved, must be kept at reset value.
Bits 18:12OFFSET1[6:0] : First calibration point: signed offset compensation[6:0].
Bits 11:0GAIN1[11:0] : First calibration point: gain AUXADC_GAIN_1V2[11:0].

Note: Refer to Section 25.1: DESIG registers for information about the location where the calibration values are stored.

12.6.12 ADC gain and offset correction 2 register (COMP_2)

Address offset: 0x2C

Reset value: 0x0000 0555

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.OSFFSET2[6:0]
1514131211109876543210
OSFFSET2[6:0]GAIN2[11:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:19Reserved, must be kept at reset value.
Bits 18:12OFFSET2[6:0] : Second calibration point: signed offset compensation[6:0].
Bits 11:0GAIN2[11:0] : Second calibration point: gain AUXADC_GAIN_1V2[11:0].

Note: Refer to Section 25.1: DESIG registers for information about the location where the calibration values are stored.

12.6.13 ADC gain and offset correction 3 register (COMP_3)

Address offset: 0x30

Reset value: 0x0000 0555

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.OSFFSET3[6:0]
rwrwrw
1514131211109876543210
OSFFSET3[6:0]GAIN3[11:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:19Reserved, must be kept at reset value.
Bits 18:12OFFSET3[6:0] : Third calibration point: signed offset compensation[6:0].
Bits 11:0GAIN3[11:0] : Third calibration point: gain AUXADC_GAIN_1V2[11:0].

Note: Refer to Section 25.1: DESIG registers for information about the location where the calibration values are stored.

12.6.14 ADC gain and offset correction 4 register (COMP_4)

Address offset: 0x34

Reset value: 0x0000 0555

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.OSFFSET4[6:0]
rwrwrw
1514131211109876543210
OSFFSET4[6:0]GAIN4[11:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:19Reserved, must be kept at reset value.
Bits 18:12OFFSET4[6:0] : Third calibration point: signed offset compensation[6:0].
Bits 11:0GAIN4[11:0] : Third calibration point: gain AUXADC_GAIN_1V2[11:0].

Note: Refer to Section 25.1: DESIG registers for information about the location where the calibration values are stored.

12.6.15 ADC gain and offset selection register (COMP_SEL)

Address offset: 0x38

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.OFFSET_GAIN8[1:0]
1514131211109876543210
OFFSET_GAIN7[1:0]OFFSET_GAIN6[1:0]OFFSET_GAIN5[1:0]OFFSET_GAIN4[1:0]OFFSET_GAIN3[1:0]OFFSET_GAIN2[1:0]OFFSET_GAIN1[1:0]OFFSET_GAIN0[1:0]
rwrwrwrwrwrwrwrwrwrw
Bits 31:18Reserved, must be kept at reset value.
Bits 17:16OFFSET_GAIN8[1:0] : Gain / offset used in ADC differential mode with Vinput range = 3.6 V:
  • 00: OFFSET1 and GAIN1 from COMP_1
  • 01: OFFSET2 and GAIN2 from COMP_2
  • 10: OFFSET3 and GAIN3 from COMP_3
  • 11: OFFSET4 and GAIN4 from COMP_4
Bits 15:14OFFSET_GAIN7[1:0] : Gain / offset used in ADC single positive mode with Vinput range = 3.6 V:
  • 00: OFFSET1 and GAIN1 from COMP_1
  • 01: OFFSET2 and GAIN2 from COMP_2
  • 10: OFFSET3 and GAIN3 from COMP_3
  • 11: OFFSET4 and GAIN4 from COMP_4
Bits 13:12OFFSET_GAIN6[1:0] : Gain / offset used in ADC single negative mode with Vinput range = 3.6 V:
  • 00: OFFSET1 and GAIN1 from COMP_1
  • 01: OFFSET2 and GAIN2 from COMP_2
  • 10: OFFSET3 and GAIN3 from COMP_3
  • 11: OFFSET4 and GAIN4 from COMP_4
Bits 11:10OFFSET_GAIN5[1:0] : Gain / offset used in ADC differential mode with Vinput range = 2.4 V:
  • 00: OFFSET1 and GAIN1 from COMP_1
  • 01: OFFSET2 and GAIN2 from COMP_2
  • 10: OFFSET3 and GAIN3 from COMP_3
  • 11: OFFSET4 and GAIN4 from COMP_4
Bits 9:8OFFSET_GAIN4[1:0] : Gain / offset used in ADC single positive mode with Vinput range = 2.4 V:
  • 00: OFFSET1 and GAIN1 from COMP_1
  • 01: OFFSET2 and GAIN2 from COMP_2
  • 10: OFFSET3 and GAIN3 from COMP_3
  • 11: OFFSET4 and GAIN4 from COMP_4
Bits 7:6OFFSET_GAIN3[1:0]: Gain / offset used in ADC single negative mode with Vinput range = 2.4 V:
  • 00: OFFSET1 and GAIN1 from COMP_1
  • 01: OFFSET2 and GAIN2 from COMP_2
  • 10: OFFSET3 and GAIN3 from COMP_3
  • 11: OFFSET4 and GAIN4 from COMP_4
Bits 5:4OFFSET_GAIN2[1:0]: Gain / offset used in ADC differential mode with Vinput range = 1.2 V:
  • 00: OFFSET1 and GAIN1 from COMP_1
  • 01: OFFSET2 and GAIN2 from COMP_2
  • 10: OFFSET3 and GAIN3 from COMP_3
  • 11: OFFSET4 and GAIN4 from COMP_4
Bits 3:2OFFSET_GAIN1[1:0]: Gain / offset used in ADC single positive mode with Vinput range = 1.2 V:
  • 00: OFFSET1 and GAIN1 from COMP_1
  • 01: OFFSET2 and GAIN2 from COMP_2
  • 10: OFFSET3 and GAIN3 from COMP_3
  • 11: OFFSET4 and GAIN4 from COMP_4
Bits 1:0OFFSET_GAIN0[1:0]: Gain / offset used in ADC single negative mode with Vinput range = 1.2 V:
  • 00: OFFSET1 and GAIN1 from COMP_1
  • 01: OFFSET2 and GAIN2 from COMP_2
  • 10: OFFSET3 and GAIN3 from COMP_3
  • 11: OFFSET4 and GAIN4 from COMP_4

12.6.16 ADC watchdog threshold register (WD_TH)

Address offset: 0x3C

Reset value: 0x0FFF 0000

31302928272625242322212019181716
Res.Res.Res.Res.WD_HT[11:0]
rwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.WD_LT[11:0]
rwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:28Reserved, must be kept at reset value.
Bits 27:16WD_HT[11:0] : Analog watchdog high level threshold.
Bits 15:12Reserved, must be kept at reset value.
Bits 11:0WD_LT[11:0] : Analog watchdog low level threshold.

12.6.17 ADC watchdog configuration register (WD_CONF)

Address offset: 0x40

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
AWD_CHX[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:16Reserved, must be kept at reset value.
Bits 15:0

AWD_CHX[15:0]: Analog watchdog channel selection to define which input channel(s) need to be guarded by the watchdog.

  • • Bit0: VINM[0] to ADC negative input
  • • Bit1: VINM[1] to ADC negative input
  • • Bit2: VINM[2] to ADC negative input
  • • Bit3: VINM[3] to ADC negative input
  • • Bit4: MICROM to ADC negative input
  • • Bit5: VBAT to ADC negative input
  • • Bit6: GND to ADC negative input
  • • Bit7: VDDA to ADC negative input
  • • Bit8: VINP[0] to ADC positive input
  • • Bit9: VINP[1] to ADC positive input
  • • Bit10: VINP[2] to ADC positive input
  • • Bit11: VINP[3] to ADC positive input
  • • Bit12: MICROP to ADC positive input
  • • Bit13: TEMP to ADC positive input
  • • Bit14: GND to ADC positive input
  • • Bit15: VDDA to ADC positive input

12.6.18 Down sampler data out register (DS_DATAOUT)

Address offset: 0x44

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
DS_DATA[15:0]
rrrrrrrrrrrrrrrr
Bits 31:16Reserved, must be kept at reset value.
Bits 15:0DS_DATA[15:0] : Contains the converted data at the output of the down sampler.

12.6.19 Decimation filter data out register (DF_DATAOUT)

Address offset: 0x48

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
DF_DATA[15:0]
rrrrrrrrrrrrrrrr
Bits 31:16Reserved, must be kept at reset value.
Bits 15:0DF_DATA[15:0] : Contains the converted data at the output of the Down Sampler.

12.6.20 ADC interrupt status register (IRQ_STATUS)

Address offset: 0x4C

Reset value: 0x0000 0000

313029282726252423222120191817
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
151413121110987654321
Res.Res.Res.Res.Res.Res.Res.Res.DF_OVRFL_IRQOVR_DF_IRQOVR_DS_IRQAWD_IRQEOS_IRQEODF_IRQEODS_IRQ
rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1
Bits 31:8Reserved, must be kept at reset value.
Bit 7

DF_OVRFL_IRQ: Set to indicate the decimation filter is saturated. When read, provide the status of the interrupt:

  • 0: No saturation on the decimation filter
  • 1: Decimation filter is saturated.

Writing this bit clears the status of the interrupt:

  • 0: No effect
  • 1: Clear the interrupt
Bit 6

OVR_DF_IRQ: Set to indicate a decimation filter overrun (a data is lost). When read, provide the status of the interrupt:

  • 0: No overrun occurred
  • 1: Overrun occurred

Writing this bit clears the status of the interrupt:

  • 0: No effect
  • 1: Clear the interrupt
Bit 5

OVR_DS_IRQ: Set to indicate a down sampler overrun (at least one data is lost). When read, provide the status of the interrupt:

  • 0: No overrun occurred
  • 1: Overrun occurred

Writing this bit clears the status of the interrupt:

  • 0: No effect
  • 1: Clear the interrupt
Bit 4

AWD_IRQ: Set when an analog watchdog event occurs. When read, provide the status of the interrupt:

  • 0: No analog watchdog event occurred
  • 1: Analog watchdog event has occurred.

Writing this bit clears the status of the interrupt:

  • 0: No effect
  • 1: Clear the interrupt
Bit 3

EOS_IRQ: Set when a sequence of conversion is completed. When read, provide the status of the interrupt:

  • 0: Sequence of conversion is not completed
  • 1: Sequence of conversion is completed.

Writing this bit clears the status of the interrupt:

  • 0: No effect
  • 1: Clear the interrupt
Bit 2

EODF_IRQ: Set when the decimation filter conversion is completed. When read, provide the status of the interrupt:

  • 0: Decimation filter conversion is not completed
  • 1: Decimation filter conversion is completed.

Writing this bit clears the status of the interrupt:

  • 0: No effect
  • 1: Clear the interrupt
Bit 1EODS_IRQ: Set when the down sampler conversion is completed. When read, provide the status of the interrupt:
  • • 0: Down sampler conversion is not completed
  • • 1: Down sampler conversion is completed Writing this bit clears the status of the interrupt:
  • • 0: No effect
  • • 1: Clear the interrupt
Bit 0Reserved, must be kept at reset value.
  • • 0: ADC conversion is not completed
  • • 1: ADC conversion is completed
Writing this bit clears the status of the interrupt:
  • • 0: No effect
  • • 1: Clear the interrupt

12.6.21 ADC interrupt enable register (IRQ_ENABLE)

Address offset: 0x50

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.DF_OVRFL_IRQ_ENAOVR_DF_IRQ_ENAOVR_DS_IRQ_ENAAWD_IRQ_ENAEOS_IRQ_ENAEODF_IRQ_ENAEODS_IRQ_ENAEOC_IRQ_ENA
rwrwrwrwrwrwrwrw
Bits 31:8Reserved, must be kept at reset value.
Bit 7DF_OVRFL_IRQ_ENA : Decimation filter saturation interrupt enable:
  • 0: DF_OVRFL interrupt is disabled
  • 1: DF_OVRFL interrupt is enabled
Bit 6OVR_DF_IRQ_ENA : Decimation filter overrun interrupt enable:
  • 0: Decimation filter interrupt is disabled
  • 1: Decimation filter interrupt is enabled
Bit 5OVR_DS_IRQ_ENA : Down sampler overrun interrupt enable:
  • 0: Down sampler interrupt is disabled
  • 1: Down sampler interrupt is enabled
Bit 4AWD_IRQ_ENA : Analog watchdog interrupt enable:
  • 0: Analog watchdog interrupt is disabled
  • 1: Analog watchdog interrupt is enabled
Bit 3EOS_IRQ_ENA : End of regular sequence interrupt enable:
  • 0: EOS interrupt is disabled
  • 1: EOS interrupt is enabled
Bit 2EODF_IRQ_ENA : End of conversion interrupt enable for the decimation filter output:
  • 0: EODF interrupt is disabled
  • 1: EODF interrupt is enabled
Bit 1EODS_IRQ_ENA : End of conversion interrupt enable for the down sampler output:
  • 0: EODF interrupt is disabled
  • 1: EODF interrupt is enabled
Bit 0Reserved, must be kept at reset value.

12.6.22 ADC timers configuration register (TIMER_CONF)

Address offset: 0x54

Reset value: 0x0000 9628

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PRECH_DELAY_SEL
rw
1514131211109876543210
VBIAS_PRECH_DELAY[7:0]ADC_LDO_DELAY[7:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
Bits 31:17Reserved, must be kept at reset value.
Bit 16PRECH_DELAY_SEL : Selects the time step PD_STEP for the VBIAS_PRECH_DELAY timer.
– 0: PD_STEP = 4 µs = (32 x 4) / 32 MHz
– 1: PD_STEP = 4.096 ms = (32 x 4 x 1024) / 32 MHz
Bits 15:8VBIAS_PRECH_DELAY[7:0] : Defines the duration of a waiting time starting at rising edge of PGA_EN signal and corresponding to the VBIAS precharge pulse duration. The delay is expressed in multiples of PD_STEP knowing PD_STEP is defined by the PRECH_DELAY_SEL bit value.
The time unit is PD_STEP (4 µs or 4.096 ms).
With PRECH_DELAY_SEL=0, the maximum delay is 1.02 ms (255 x 4 µs).
With PRECH_DELAY_SEL=1, the maximum delay is 1044.48 ms (255 x 4.096 ms). Default value is 600 µs (150 x 4 µs).
Bits 7:0ADC_LDO_DELAY[7:0] : Defines the duration of a waiting time to be inserted between the ADC_LDO enable and the ADC ON to let time to the LDO to stabilize before starting a conversion.
The time unit is 4 µs.
Maximum delay is 1.02 ms (255 x 4 µs). Default value is 40 = 160 µs.

12.6.23 ADC registers map

Table 37. ADC register map and reset values

OffsetRegister313029282726252423222120191817161514131211109876543210
0x00VERSION_IDRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.VERSION_ID[7:0]
Reset value00100000
0x04CONFRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.VBIAS_PRECH_FORCEADC_CONT_1V2BIT_INVERT_DIFFBIT_INVERT_SNOVR_DF_CFGOVR_DS_CFGDMA_DF_ENADMA_DS_ENASAMPLE_RATE[1:0]Res.Res.OP_MODE[1:0]SMPS_SYNCHRO_ENASEQ_LEN[3:0]SEQUENCECONT.
Reset value00010000000000000010
0x08CTRLRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.ADC_LDO_ENARes.DIG_AUD_MODESTOP_OP_MODESTART_CONVADC_ON_OFF
Reset value000000
0x0COCM_CTRLRes.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.OCM_ENAOCM_SRC
Reset value00
0x10PGA_CONFRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PGA_BIAS[2:0]PGA_GAIN[3:0]Res.
Reset value0
OffsetRegister313029282726252423222120191817161514131211109876543210
0x14SWITCHRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.SE_VIN_7[1:0]SE_VIN_6[1:0]SE_VIN_5[1:0]SE_VIN_4[1:0]SE_VIN_3[1:0]SE_VIN_2[1:0]SE_VIN_1[1:0]SE_VIN_0[1:0]
Reset value000000000000000
0x18DF_CONFRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DF_HALF_D_ENDF_HPF_ENDF_MICROL_RNDF_O_S2UDF_I_U2SDF_ITP1P2DF_CIC_DHFDF_CIC_DEC_FACTOR[6:0]
Reset value0000110000001010
0x1CDS_CONFRes.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.DS_WIDTH[2:0]
Reset value00000
0x20SEQ_1SEQ0[3:0]
Reset value0000000000000000000000000000000
0x24SEQ_2SEQ0[3:0]
Reset value0000000000000000000000000000000
0x28COMP_1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value000000001010101010
OffsetRegister313029282726252423222120191817161514131211109876543210
0x2CCOMP_2Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.OFFSET2[6:0]GAIN2[11:0]
Reset value0000000010101010101
0x30COMP_3Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.OFFSET3[6:0]GAIN3[11:0]
Reset value0000000010101010101
0x34COMP_4Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.OFFSET4[6:0]GAIN4[11:0]
Reset value0000000010101010101
0x38COMP_SELRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.OFFSET_GAIN8[1:0]OFFSET_GAIN7[1:0]OFFSET_GAIN6[1:0]OFFSET_GAIN5[1:0]OFFSET_GAIN4[1:0]OFFSET_GAIN3[1:0]OFFSET_GAIN2[1:0]OFFSET_GAIN01[1:0]OFFSET_GAIN0[1:0]
Reset value000000000000000000
0x3CWD_THRes.Res.Res.Res.WD_HT[11:0]Res.Res.Res.Res.WD_LT[11:0]
Reset value111111111111000000000000
0x40WD_CONFRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.AWD_CHX[15:0]
Reset value0000000000000000
OffsetRegister313029282726252423222120191817161514131211109876543210
0x44DS_DATAOUTRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DS_DATA[15:0]
Reset value000000000000000
0x48DF_DATAOUTRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DF_DATA[15:0]
Reset value00000000000000
0x4CIRQ_STATUSRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DF_OVRFL_IRQDF_OVRFL_IRQOVR_DF_IRQOVR_DS_IRQAWD_IRQEOS_IRQEODF_IRQEODS_IRQEOC_IRQ
Reset value00000000
0x50IRQ_ENABLERes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.DF_OVRFL_IRQ_ENADF_OVRFL_IRQ_ENAOVR_DF_IRQ_ENAOVR_DS_IRQ_ENAAWD_IRQ_ENAEOS_IRQ_ENAEODF_IRQ_ENAEODS_IRQ_ENAEOC_IRQ_ENA
Reset value00000000
0x54TIMER_CONFRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.PRECH_DELAY_SELVBIAS_PRECH_DELAY[7:0]
Reset value0100101100010100

Refer to Table 3. STM32WB07xC and STM32WB06xC memory map and peripheral register boundary addresses for the register boundary addresses.