EasyManuals Logo

ST STM32L4x6 User Manual

ST STM32L4x6
1693 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #464 background imageLoading...
Page #464 background image
Analog-to-digital converters (ADC) RM0351
464/1693 DocID024597 Rev 3
Special case: when left-aligned, the data are aligned on a half-word basis except when the
resolution is set to 6-bit. In that case, the data are aligned on a byte basis as shown in
Figure 90 and Figure 91.
Note: Left-alignment is not supported in oversampling mode. When ROVSE and/or JOVSE bit is
set, the ALIGN bit value is ignored and the ADC only provides right-aligned data.
Offset
An offset y (y=1,2,3,4) can be applied to a channel by setting the bit OFFSETy_EN=1 into
ADCx_OFRy register. The channel to which the offset will be applied is programmed into the
bits OFFSETy_CH[4:0] of ADCx_OFRy register. In this case, the converted value is
decreased by the user-defined offset written in the bits OFFSETy[11:0]. The result may be a
negative value so the read data is signed and the SEXT bit represents the extended sign
value.
Note: Offset correction is not supported in oversampling mode. When ROVSE and/or JOVSE bit is
set, the value of the OFFSETy_EN bit in ADCx_OFRy register is ignored (considered as
reset).
Table 93 describes how the comparison is performed for all the possible resolutions for
analog watchdog 1.
When reading data from ADCx_DR (regular channel) or from ADCx_JDRy (injected
channel, y=1,2,3,4) corresponding to the channel “i”:
If one of the offsets is enabled (bit OFFSETy_EN=1) for the corresponding channel, the
read data is signed.
If none of the four offsets is enabled for this channel, the read data is not signed.
Figure 88, Figure 89, Figure 90 and Figure 91 show alignments for signed and unsigned
data.
Table 91. Offset computation versus data resolution
Resolution
(bits
RES[1:0])
Substraction between raw
converted data and offset:
Result Comments
Raw
converted
Data, left
aligned
Offset
00: 12-bit DATA[11:0] OFFSET[11:0]
signed 12-bit
data
-
01: 10-bit DATA[11:2],00 OFFSET[11:0]
signed 10-bit
data
The user must configure OFFSET[1:0]
to “00”
10: 8-bit
DATA[11:4],00
00
OFFSET[11:0]
signed 8-bit
data
The user must configure OFFSET[3:0]
to “0000”
11: 6-bit
DATA[11:6],00
0000
OFFSET[11:0]
signed 6-bit
data
The user must configure OFFSET[5:0]
to “000000”

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32L4x6 and is the answer not in the manual?

ST STM32L4x6 Specifications

General IconGeneral
BrandST
ModelSTM32L4x6
CategoryMicrocontrollers
LanguageEnglish

Related product manuals