01.06.2014 Views

STM32W108C8

STM32W108C8

STM32W108C8

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>STM32W108C8</strong><br />

Analog-to-digital converter<br />

To convert multiple inputs using this approach, repeat Steps 4 through 6, loading the desired<br />

input configurations to ADC_CFG in Step 5. If the inputs can use the same offset/gain<br />

correction, just repeat Steps 5 and 6.<br />

11.1.8 Calibration<br />

Sampling of internal connections GND, VREF/2, and VREF allow for offset and gain<br />

calibration of the ADC in applications where absolute accuracy is important. Offset error is<br />

calculated from the minimum input and gain error is calculated from the full scale input<br />

range. Correction using VREF is recommended because VREF is calibrated by the ST<br />

software against VDD_PADSA. The VDD_PADSA regulator is factory-trimmed to 1.80 V ±<br />

20 mV. If better absolute accuracy is required, the ADC can be configured to use an external<br />

reference. The ADC calibrates as a single-ended measurement. Differential signals require<br />

correction of both their inputs.<br />

Table 110 shows the equations used to calculate the gain and offset correction values.<br />

Table 110.<br />

ADC gain and offset correction equations<br />

Calibration<br />

Correction value<br />

Gain, buffer disabled<br />

Gain, buffer enabled<br />

Offset, buffer disabled (after applying gain correction)<br />

Offset, buffer enabled (after applying gain correction)<br />

Equation notes<br />

●<br />

●<br />

●<br />

●<br />

●<br />

All N are 16-bit two’s complement numbers.<br />

N GND is a sampling of ground. Due to the ADC's internal design, VGND does not yield<br />

the minimum two’s complement value 0x8000 as the conversion result. Instead, VGND<br />

yields a two’s complement value close to 0xE000 when the input buffer is not selected.<br />

VGND cannot be measured when the input buffer is enabled because it is outside the<br />

buffer’s input range.<br />

N VREF is a sampling of VREF. Due to the ADC's internal design, VREF does not yield<br />

the maximum positive two’s complement 0x7FFF as the conversion result. Instead,<br />

VREF yields a two’s complement value close to 0x2000 when the input buffer is not<br />

selected and yields a two’s complement value close to 0xF000 when the input buffer is<br />

selected.<br />

N VREF/2 is a sampling of VREF/2. VREF/2 yields a two’s complement value close to<br />

0x0000 when the input buffer is not selected, and yields a two’s complement value<br />

close to 0xE800 when the input buffer is selected.<br />

Offset correction is affected by the gain correction value. Offset correction is calculated<br />

after gain correction has been applied.<br />

Doc ID 018587 Rev 2 166/215

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!