20#ifndef STM32H7xx_LL_ADC_H
21#define STM32H7xx_LL_ADC_H
34#if defined (ADC1) || defined (ADC2) || defined (ADC3)
58#define ADC_CALIB_FACTOR_OFFSET_REGOFFSET (0x00000000UL)
59#define ADC_CALIB_FACTOR_LINEARITY_REGOFFSET (0x00000001UL)
60#define ADC_CALIB_FACTOR_REGOFFSET_MASK (ADC_CALIB_FACTOR_OFFSET_REGOFFSET | ADC_CALIB_FACTOR_LINEARITY_REGOFFSET)
61#define ADC_CALIB_MODE_MASK (ADC_CR_ADCALLIN)
62#define ADC_CALIB_MODE_BINARY_MASK (ADC_CALIB_FACTOR_REGOFFSET_MASK)
72#define ADC_SQR1_REGOFFSET (0x00000000UL)
73#define ADC_SQR2_REGOFFSET (0x00000100UL)
74#define ADC_SQR3_REGOFFSET (0x00000200UL)
75#define ADC_SQR4_REGOFFSET (0x00000300UL)
77#define ADC_REG_SQRX_REGOFFSET_MASK (ADC_SQR1_REGOFFSET | ADC_SQR2_REGOFFSET | ADC_SQR3_REGOFFSET | ADC_SQR4_REGOFFSET)
78#define ADC_SQRX_REGOFFSET_POS (8UL)
79#define ADC_REG_RANK_ID_SQRX_MASK (ADC_CHANNEL_ID_NUMBER_MASK_POSBIT0)
83#define ADC_REG_RANK_1_SQRX_BITOFFSET_POS ( 6UL)
84#define ADC_REG_RANK_2_SQRX_BITOFFSET_POS (12UL)
85#define ADC_REG_RANK_3_SQRX_BITOFFSET_POS (18UL)
86#define ADC_REG_RANK_4_SQRX_BITOFFSET_POS (24UL)
87#define ADC_REG_RANK_5_SQRX_BITOFFSET_POS ( 0UL)
88#define ADC_REG_RANK_6_SQRX_BITOFFSET_POS ( 6UL)
89#define ADC_REG_RANK_7_SQRX_BITOFFSET_POS (12UL)
90#define ADC_REG_RANK_8_SQRX_BITOFFSET_POS (18UL)
91#define ADC_REG_RANK_9_SQRX_BITOFFSET_POS (24UL)
92#define ADC_REG_RANK_10_SQRX_BITOFFSET_POS ( 0UL)
93#define ADC_REG_RANK_11_SQRX_BITOFFSET_POS ( 6UL)
94#define ADC_REG_RANK_12_SQRX_BITOFFSET_POS (12UL)
95#define ADC_REG_RANK_13_SQRX_BITOFFSET_POS (18UL)
96#define ADC_REG_RANK_14_SQRX_BITOFFSET_POS (24UL)
97#define ADC_REG_RANK_15_SQRX_BITOFFSET_POS ( 0UL)
98#define ADC_REG_RANK_16_SQRX_BITOFFSET_POS ( 6UL)
109#define ADC_JDR1_REGOFFSET (0x00000000UL)
110#define ADC_JDR2_REGOFFSET (0x00000100UL)
111#define ADC_JDR3_REGOFFSET (0x00000200UL)
112#define ADC_JDR4_REGOFFSET (0x00000300UL)
114#define ADC_INJ_JDRX_REGOFFSET_MASK (ADC_JDR1_REGOFFSET | ADC_JDR2_REGOFFSET | ADC_JDR3_REGOFFSET | ADC_JDR4_REGOFFSET)
115#define ADC_INJ_RANK_ID_JSQR_MASK (ADC_CHANNEL_ID_NUMBER_MASK_POSBIT0)
116#define ADC_JDRX_REGOFFSET_POS (8UL)
120#define ADC_INJ_RANK_1_JSQR_BITOFFSET_POS (ADC_JSQR_JSQ1_Pos)
121#define ADC_INJ_RANK_2_JSQR_BITOFFSET_POS (ADC_JSQR_JSQ2_Pos)
122#define ADC_INJ_RANK_3_JSQR_BITOFFSET_POS (ADC_JSQR_JSQ3_Pos)
123#define ADC_INJ_RANK_4_JSQR_BITOFFSET_POS (ADC_JSQR_JSQ4_Pos)
131#define ADC_REG_TRIG_EXT_EDGE_DEFAULT (ADC_CFGR_EXTEN_0)
136#define ADC_REG_TRIG_SOURCE_MASK (((LL_ADC_REG_TRIG_SOFTWARE & ADC_CFGR_EXTSEL) << (4U * 0UL)) | \
137 ((ADC_CFGR_EXTSEL) << (4U * 1UL)) | \
138 ((ADC_CFGR_EXTSEL) << (4U * 2UL)) | \
139 ((ADC_CFGR_EXTSEL) << (4U * 3UL)) )
144#define ADC_REG_TRIG_EDGE_MASK (((LL_ADC_REG_TRIG_SOFTWARE & ADC_CFGR_EXTEN) << (4U * 0UL)) | \
145 ((ADC_REG_TRIG_EXT_EDGE_DEFAULT) << (4U * 1UL)) | \
146 ((ADC_REG_TRIG_EXT_EDGE_DEFAULT) << (4U * 2UL)) | \
147 ((ADC_REG_TRIG_EXT_EDGE_DEFAULT) << (4U * 3UL)) )
150#define ADC_REG_TRIG_EXTSEL_BITOFFSET_POS ( 6UL)
151#define ADC_REG_TRIG_EXTEN_BITOFFSET_POS (10UL)
159#define ADC_INJ_TRIG_EXT_EDGE_DEFAULT (ADC_JSQR_JEXTEN_0)
164#define ADC_INJ_TRIG_SOURCE_MASK (((LL_ADC_INJ_TRIG_SOFTWARE & ADC_JSQR_JEXTSEL) << (4U * 0UL)) | \
165 ((ADC_JSQR_JEXTSEL) << (4U * 1UL)) | \
166 ((ADC_JSQR_JEXTSEL) << (4U * 2UL)) | \
167 ((ADC_JSQR_JEXTSEL) << (4U * 3UL)) )
172#define ADC_INJ_TRIG_EDGE_MASK (((LL_ADC_INJ_TRIG_SOFTWARE & ADC_JSQR_JEXTEN) << (4U * 0UL)) | \
173 ((ADC_INJ_TRIG_EXT_EDGE_DEFAULT) << (4U * 1UL)) | \
174 ((ADC_INJ_TRIG_EXT_EDGE_DEFAULT) << (4U * 2UL)) | \
175 ((ADC_INJ_TRIG_EXT_EDGE_DEFAULT) << (4U * 3UL)) )
178#define ADC_INJ_TRIG_EXTSEL_BITOFFSET_POS ( 2UL)
179#define ADC_INJ_TRIG_EXTEN_BITOFFSET_POS ( 6UL)
194#define ADC_CHANNEL_ID_NUMBER_MASK (ADC_CFGR_AWD1CH)
195#define ADC_CHANNEL_ID_BITFIELD_MASK (ADC_AWD2CR_AWD2CH)
196#define ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS (26UL)
197#define ADC_CHANNEL_ID_MASK (ADC_CHANNEL_ID_NUMBER_MASK | ADC_CHANNEL_ID_BITFIELD_MASK | ADC_CHANNEL_ID_INTERNAL_CH_MASK)
199#define ADC_CHANNEL_ID_NUMBER_MASK_POSBIT0 (ADC_SQR2_SQ5)
202#define ADC_CHANNEL_ID_INTERNAL_CH (0x80000000UL)
203#define ADC_CHANNEL_ID_INTERNAL_CH_MASK (ADC_CHANNEL_ID_INTERNAL_CH)
207#define ADC_SMPR1_REGOFFSET (0x00000000UL)
208#define ADC_SMPR2_REGOFFSET (0x02000000UL)
209#define ADC_CHANNEL_SMPRX_REGOFFSET_MASK (ADC_SMPR1_REGOFFSET | ADC_SMPR2_REGOFFSET)
210#define ADC_SMPRX_REGOFFSET_POS (25UL)
212#define ADC_CHANNEL_SMPx_BITOFFSET_MASK (0x01F00000UL)
213#define ADC_CHANNEL_SMPx_BITOFFSET_POS (20UL)
217#define ADC_CHANNEL_0_NUMBER (0x00000000UL)
218#define ADC_CHANNEL_1_NUMBER ( ADC_CFGR_AWD1CH_0)
219#define ADC_CHANNEL_2_NUMBER ( ADC_CFGR_AWD1CH_1 )
220#define ADC_CHANNEL_3_NUMBER ( ADC_CFGR_AWD1CH_1 | ADC_CFGR_AWD1CH_0)
221#define ADC_CHANNEL_4_NUMBER ( ADC_CFGR_AWD1CH_2 )
222#define ADC_CHANNEL_5_NUMBER ( ADC_CFGR_AWD1CH_2 | ADC_CFGR_AWD1CH_0)
223#define ADC_CHANNEL_6_NUMBER ( ADC_CFGR_AWD1CH_2 | ADC_CFGR_AWD1CH_1 )
224#define ADC_CHANNEL_7_NUMBER ( ADC_CFGR_AWD1CH_2 | ADC_CFGR_AWD1CH_1 | ADC_CFGR_AWD1CH_0)
225#define ADC_CHANNEL_8_NUMBER ( ADC_CFGR_AWD1CH_3 )
226#define ADC_CHANNEL_9_NUMBER ( ADC_CFGR_AWD1CH_3 | ADC_CFGR_AWD1CH_0)
227#define ADC_CHANNEL_10_NUMBER ( ADC_CFGR_AWD1CH_3 | ADC_CFGR_AWD1CH_1 )
228#define ADC_CHANNEL_11_NUMBER ( ADC_CFGR_AWD1CH_3 | ADC_CFGR_AWD1CH_1 | ADC_CFGR_AWD1CH_0)
229#define ADC_CHANNEL_12_NUMBER ( ADC_CFGR_AWD1CH_3 | ADC_CFGR_AWD1CH_2 )
230#define ADC_CHANNEL_13_NUMBER ( ADC_CFGR_AWD1CH_3 | ADC_CFGR_AWD1CH_2 | ADC_CFGR_AWD1CH_0)
231#define ADC_CHANNEL_14_NUMBER ( ADC_CFGR_AWD1CH_3 | ADC_CFGR_AWD1CH_2 | ADC_CFGR_AWD1CH_1 )
232#define ADC_CHANNEL_15_NUMBER ( ADC_CFGR_AWD1CH_3 | ADC_CFGR_AWD1CH_2 | ADC_CFGR_AWD1CH_1 | ADC_CFGR_AWD1CH_0)
233#define ADC_CHANNEL_16_NUMBER (ADC_CFGR_AWD1CH_4 )
234#define ADC_CHANNEL_17_NUMBER (ADC_CFGR_AWD1CH_4 | ADC_CFGR_AWD1CH_0)
235#define ADC_CHANNEL_18_NUMBER (ADC_CFGR_AWD1CH_4 | ADC_CFGR_AWD1CH_1 )
236#define ADC_CHANNEL_19_NUMBER (ADC_CFGR_AWD1CH_4 | ADC_CFGR_AWD1CH_1 | ADC_CFGR_AWD1CH_0)
240#define ADC_CHANNEL_0_BITFIELD (ADC_AWD2CR_AWD2CH_0)
241#define ADC_CHANNEL_1_BITFIELD (ADC_AWD2CR_AWD2CH_1)
242#define ADC_CHANNEL_2_BITFIELD (ADC_AWD2CR_AWD2CH_2)
243#define ADC_CHANNEL_3_BITFIELD (ADC_AWD2CR_AWD2CH_3)
244#define ADC_CHANNEL_4_BITFIELD (ADC_AWD2CR_AWD2CH_4)
245#define ADC_CHANNEL_5_BITFIELD (ADC_AWD2CR_AWD2CH_5)
246#define ADC_CHANNEL_6_BITFIELD (ADC_AWD2CR_AWD2CH_6)
247#define ADC_CHANNEL_7_BITFIELD (ADC_AWD2CR_AWD2CH_7)
248#define ADC_CHANNEL_8_BITFIELD (ADC_AWD2CR_AWD2CH_8)
249#define ADC_CHANNEL_9_BITFIELD (ADC_AWD2CR_AWD2CH_9)
250#define ADC_CHANNEL_10_BITFIELD (ADC_AWD2CR_AWD2CH_10)
251#define ADC_CHANNEL_11_BITFIELD (ADC_AWD2CR_AWD2CH_11)
252#define ADC_CHANNEL_12_BITFIELD (ADC_AWD2CR_AWD2CH_12)
253#define ADC_CHANNEL_13_BITFIELD (ADC_AWD2CR_AWD2CH_13)
254#define ADC_CHANNEL_14_BITFIELD (ADC_AWD2CR_AWD2CH_14)
255#define ADC_CHANNEL_15_BITFIELD (ADC_AWD2CR_AWD2CH_15)
256#define ADC_CHANNEL_16_BITFIELD (ADC_AWD2CR_AWD2CH_16)
257#define ADC_CHANNEL_17_BITFIELD (ADC_AWD2CR_AWD2CH_17)
258#define ADC_CHANNEL_18_BITFIELD (ADC_AWD2CR_AWD2CH_18)
259#define ADC_CHANNEL_19_BITFIELD (ADC_AWD2CR_AWD2CH_19)
263#define ADC_CHANNEL_0_SMP (ADC_SMPR1_REGOFFSET | (( 0UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
264#define ADC_CHANNEL_1_SMP (ADC_SMPR1_REGOFFSET | (( 3UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
265#define ADC_CHANNEL_2_SMP (ADC_SMPR1_REGOFFSET | (( 6UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
266#define ADC_CHANNEL_3_SMP (ADC_SMPR1_REGOFFSET | (( 9UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
267#define ADC_CHANNEL_4_SMP (ADC_SMPR1_REGOFFSET | ((12UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
268#define ADC_CHANNEL_5_SMP (ADC_SMPR1_REGOFFSET | ((15UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
269#define ADC_CHANNEL_6_SMP (ADC_SMPR1_REGOFFSET | ((18UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
270#define ADC_CHANNEL_7_SMP (ADC_SMPR1_REGOFFSET | ((21UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
271#define ADC_CHANNEL_8_SMP (ADC_SMPR1_REGOFFSET | ((24UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
272#define ADC_CHANNEL_9_SMP (ADC_SMPR1_REGOFFSET | ((27UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
273#define ADC_CHANNEL_10_SMP (ADC_SMPR2_REGOFFSET | (( 0UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
274#define ADC_CHANNEL_11_SMP (ADC_SMPR2_REGOFFSET | (( 3UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
275#define ADC_CHANNEL_12_SMP (ADC_SMPR2_REGOFFSET | (( 6UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
276#define ADC_CHANNEL_13_SMP (ADC_SMPR2_REGOFFSET | (( 9UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
277#define ADC_CHANNEL_14_SMP (ADC_SMPR2_REGOFFSET | ((12UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
278#define ADC_CHANNEL_15_SMP (ADC_SMPR2_REGOFFSET | ((15UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
279#define ADC_CHANNEL_16_SMP (ADC_SMPR2_REGOFFSET | ((18UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
280#define ADC_CHANNEL_17_SMP (ADC_SMPR2_REGOFFSET | ((21UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
281#define ADC_CHANNEL_18_SMP (ADC_SMPR2_REGOFFSET | ((24UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
282#define ADC_CHANNEL_19_SMP (ADC_SMPR2_REGOFFSET | ((27UL) << ADC_CHANNEL_SMPx_BITOFFSET_POS))
291#define ADC_SINGLEDIFF_CALIB_START_MASK (ADC_CR_ADCALDIF)
292#define ADC_SINGLEDIFF_CALIB_FACTOR_MASK (ADC_CALFACT_CALFACT_D | ADC_CALFACT_CALFACT_S)
293#define ADC_SINGLEDIFF_CHANNEL_MASK (ADC_CHANNEL_ID_BITFIELD_MASK)
294#define ADC_SINGLEDIFF_CHANNEL_SHIFT_MASK (ADC_CALFACT_CALFACT_S_4 | ADC_CALFACT_CALFACT_S_3)
295#define ADC_SINGLEDIFF_CALIB_F_BIT_D_MASK (0x00010000UL)
296#define ADC_SINGLEDIFF_CALIB_F_BIT_D_POS (16UL)
297#define ADC_SINGLEDIFF_CALIB_F_BIT_D_SHIFT4 (ADC_SINGLEDIFF_CALIB_F_BIT_D_POS - 4UL)
309#define ADC_AWD_CR1_REGOFFSET (0x00000000UL)
310#define ADC_AWD_CR2_REGOFFSET (0x00100000UL)
311#define ADC_AWD_CR3_REGOFFSET (0x00200000UL)
315#define ADC_AWD_CR12_REGOFFSETGAP_MASK (ADC_AWD2CR_AWD2CH_0)
316#define ADC_AWD_CR12_REGOFFSETGAP_VAL (0x00000024UL)
318#define ADC_AWD_CRX_REGOFFSET_MASK (ADC_AWD_CR1_REGOFFSET | ADC_AWD_CR2_REGOFFSET | ADC_AWD_CR3_REGOFFSET)
320#define ADC_AWD_CR1_CHANNEL_MASK (ADC_CFGR_AWD1CH | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
321#define ADC_AWD_CR23_CHANNEL_MASK (ADC_AWD2CR_AWD2CH)
322#define ADC_AWD_CR_ALL_CHANNEL_MASK (ADC_AWD_CR1_CHANNEL_MASK | ADC_AWD_CR23_CHANNEL_MASK)
324#define ADC_AWD_CRX_REGOFFSET_POS (20UL)
327#define ADC_AWD_TR1_REGOFFSET (ADC_AWD_CR1_REGOFFSET)
328#define ADC_AWD_TR2_REGOFFSET (ADC_AWD_CR2_REGOFFSET)
329#define ADC_AWD_TR3_REGOFFSET (ADC_AWD_CR3_REGOFFSET)
330#define ADC_AWD_TRX_REGOFFSET_MASK (ADC_AWD_TR1_REGOFFSET | ADC_AWD_TR2_REGOFFSET | ADC_AWD_TR3_REGOFFSET)
331#define ADC_AWD_TRX_REGOFFSET_POS (ADC_AWD_CRX_REGOFFSET_POS)
332#if defined(ADC_VER_V5_V90)
333#define ADC_AWD_TRX_BIT_HIGH_MASK (0x00010000UL)
334#define ADC_AWD_TRX_BIT_HIGH_POS (16UL)
335#define ADC_AWD_TRX_BIT_HIGH_SHIFT4 (ADC_AWD_TRX_BIT_HIGH_POS - 4UL)
340#define ADC_AWD_TR12_REGOFFSETGAP_MASK (ADC_AWD2CR_AWD2CH_0)
341#define ADC_AWD_TR12_REGOFFSETGAP_VAL (0x00000022UL)
344#define LL_ADC_AWD1_TR LL_ADC_AWD1
345#define LL_ADC_AWD2_TR LL_ADC_AWD2
346#define LL_ADC_AWD3_TR LL_ADC_AWD3
350#define ADC_OFR1_REGOFFSET (0x00000000UL)
351#define ADC_OFR2_REGOFFSET (0x00000001UL)
352#define ADC_OFR3_REGOFFSET (0x00000002UL)
353#define ADC_OFR4_REGOFFSET (0x00000003UL)
354#define ADC_OFRx_REGOFFSET_MASK (ADC_OFR1_REGOFFSET | ADC_OFR2_REGOFFSET | ADC_OFR3_REGOFFSET | ADC_OFR4_REGOFFSET)
358#define ADC_CFGR_RES_BITOFFSET_POS (ADC_CFGR_RES_Pos)
359#define ADC_CFGR_AWD1SGL_BITOFFSET_POS (ADC_CFGR_AWD1SGL_Pos)
360#define ADC_CFGR_AWD1EN_BITOFFSET_POS (ADC_CFGR_AWD1EN_Pos)
361#define ADC_CFGR_JAWD1EN_BITOFFSET_POS (ADC_CFGR_JAWD1EN_Pos)
362#if defined(ADC_VER_V5_V90)
363#define ADC_CFGR_RES_BITOFFSET_POS_ADC3 (ADC3_CFGR_RES_Pos)
368#define ADC_CR_BITS_PROPERTY_RS (ADC_CR_ADCAL | ADC_CR_JADSTP | ADC_CR_ADSTP | ADC_CR_JADSTART | ADC_CR_ADSTART | ADC_CR_ADDIS | ADC_CR_ADEN)
373#if defined(ADC_VER_V5_3)
374#define VREFINT_CAL_ADDR ((uint16_t*) (0x8fff810UL))
377#define VREFINT_CAL_ADDR ((uint16_t*) (0x1FF1E860UL))
379#define VREFINT_CAL_VREF (3300UL)
381#if defined(ADC_VER_V5_3)
382#define TEMPSENSOR_CAL1_ADDR ((uint16_t*) (0x8fff814UL))
383#define TEMPSENSOR_CAL2_ADDR ((uint16_t*) (0x8fff818UL))
386#define TEMPSENSOR_CAL1_ADDR ((uint16_t*) (0x1FF1E820UL))
387#define TEMPSENSOR_CAL2_ADDR ((uint16_t*) (0x1FF1E840UL))
390#define TEMPSENSOR_CAL1_TEMP (30L)
391#define TEMPSENSOR_CAL2_TEMP (110L)
392#define TEMPSENSOR_CAL_VREFANALOG (3300UL)
395#define ADC_LINEAR_CALIB_REG_1_ADDR ((uint32_t*) (0x1FF1EC00UL))
396#define ADC_LINEAR_CALIB_REG_2_ADDR ((uint32_t*) (0x1FF1EC04UL))
397#define ADC_LINEAR_CALIB_REG_3_ADDR ((uint32_t*) (0x1FF1EC08UL))
398#define ADC_LINEAR_CALIB_REG_4_ADDR ((uint32_t*) (0x1FF1EC0CUL))
399#define ADC_LINEAR_CALIB_REG_5_ADDR ((uint32_t*) (0x1FF1EC10UL))
400#define ADC_LINEAR_CALIB_REG_6_ADDR ((uint32_t*) (0x1FF1EC14UL))
401#define ADC_LINEAR_CALIB_REG_COUNT (6UL)
410#define LL_ADC_SetChannelPreSelection LL_ADC_SetChannelPreselection
430#define __ADC_PTR_REG_OFFSET(__REG__, __REG_OFFFSET__) \
431 ((__IO uint32_t *)((uint32_t) ((uint32_t)(&(__REG__)) + ((__REG_OFFFSET__) << 2UL))))
439#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
457 uint32_t CommonClock;
470 uint32_t MultiDMATransfer;
475 uint32_t MultiTwoSamplingDelay;
480} LL_ADC_CommonInitTypeDef;
509 uint32_t LeftBitShift;
512 uint32_t LowPowerMode;
540 uint32_t TriggerSource;
548 uint32_t SequencerLength;
553 uint32_t SequencerDiscont;
560 uint32_t ContinuousMode;
566 uint32_t DataTransferMode;
577} LL_ADC_REG_InitTypeDef;
600 uint32_t TriggerSource;
608 uint32_t SequencerLength;
613 uint32_t SequencerDiscont;
626} LL_ADC_INJ_InitTypeDef;
644#define LL_ADC_FLAG_ADRDY ADC_ISR_ADRDY
645#define LL_ADC_FLAG_EOC ADC_ISR_EOC
646#define LL_ADC_FLAG_EOS ADC_ISR_EOS
647#define LL_ADC_FLAG_OVR ADC_ISR_OVR
648#define LL_ADC_FLAG_EOSMP ADC_ISR_EOSMP
649#define LL_ADC_FLAG_JEOC ADC_ISR_JEOC
650#define LL_ADC_FLAG_JEOS ADC_ISR_JEOS
651#define LL_ADC_FLAG_JQOVF ADC_ISR_JQOVF
652#define LL_ADC_FLAG_AWD1 ADC_ISR_AWD1
653#define LL_ADC_FLAG_AWD2 ADC_ISR_AWD2
654#define LL_ADC_FLAG_AWD3 ADC_ISR_AWD3
655#define LL_ADC_FLAG_LDORDY ADC_ISR_LDORDY
656#define LL_ADC_FLAG_ADRDY_MST ADC_CSR_ADRDY_MST
657#define LL_ADC_FLAG_ADRDY_SLV ADC_CSR_ADRDY_SLV
658#define LL_ADC_FLAG_EOC_MST ADC_CSR_EOC_MST
659#define LL_ADC_FLAG_EOC_SLV ADC_CSR_EOC_SLV
660#define LL_ADC_FLAG_EOS_MST ADC_CSR_EOS_MST
661#define LL_ADC_FLAG_EOS_SLV ADC_CSR_EOS_SLV
662#define LL_ADC_FLAG_OVR_MST ADC_CSR_OVR_MST
663#define LL_ADC_FLAG_OVR_SLV ADC_CSR_OVR_SLV
664#define LL_ADC_FLAG_EOSMP_MST ADC_CSR_EOSMP_MST
665#define LL_ADC_FLAG_EOSMP_SLV ADC_CSR_EOSMP_SLV
666#define LL_ADC_FLAG_JEOC_MST ADC_CSR_JEOC_MST
667#define LL_ADC_FLAG_JEOC_SLV ADC_CSR_JEOC_SLV
668#define LL_ADC_FLAG_JEOS_MST ADC_CSR_JEOS_MST
669#define LL_ADC_FLAG_JEOS_SLV ADC_CSR_JEOS_SLV
670#define LL_ADC_FLAG_JQOVF_MST ADC_CSR_JQOVF_MST
671#define LL_ADC_FLAG_JQOVF_SLV ADC_CSR_JQOVF_SLV
672#define LL_ADC_FLAG_AWD1_MST ADC_CSR_AWD1_MST
673#define LL_ADC_FLAG_AWD1_SLV ADC_CSR_AWD1_SLV
674#define LL_ADC_FLAG_AWD2_MST ADC_CSR_AWD2_MST
675#define LL_ADC_FLAG_AWD2_SLV ADC_CSR_AWD2_SLV
676#define LL_ADC_FLAG_AWD3_MST ADC_CSR_AWD3_MST
677#define LL_ADC_FLAG_AWD3_SLV ADC_CSR_AWD3_SLV
687#define LL_ADC_IT_ADRDY ADC_IER_ADRDYIE
688#define LL_ADC_IT_EOC ADC_IER_EOCIE
689#define LL_ADC_IT_EOS ADC_IER_EOSIE
690#define LL_ADC_IT_OVR ADC_IER_OVRIE
691#define LL_ADC_IT_EOSMP ADC_IER_EOSMPIE
692#define LL_ADC_IT_JEOC ADC_IER_JEOCIE
693#define LL_ADC_IT_JEOS ADC_IER_JEOSIE
694#define LL_ADC_IT_JQOVF ADC_IER_JQOVFIE
695#define LL_ADC_IT_AWD1 ADC_IER_AWD1IE
696#define LL_ADC_IT_AWD2 ADC_IER_AWD2IE
697#define LL_ADC_IT_AWD3 ADC_IER_AWD3IE
709#define LL_ADC_DMA_REG_REGULAR_DATA (0x00000000UL)
710#define LL_ADC_DMA_REG_REGULAR_DATA_MULTI (0x00000001UL)
719#define LL_ADC_CLOCK_SYNC_PCLK_DIV1 (ADC_CCR_CKMODE_0)
720#define LL_ADC_CLOCK_SYNC_PCLK_DIV2 (ADC_CCR_CKMODE_1 )
721#define LL_ADC_CLOCK_SYNC_PCLK_DIV4 (ADC_CCR_CKMODE_1 | ADC_CCR_CKMODE_0)
722#define LL_ADC_CLOCK_ASYNC_DIV1 (0x00000000UL)
723#define LL_ADC_CLOCK_ASYNC_DIV2 (ADC_CCR_PRESC_0)
724#define LL_ADC_CLOCK_ASYNC_DIV4 (ADC_CCR_PRESC_1 )
725#define LL_ADC_CLOCK_ASYNC_DIV6 (ADC_CCR_PRESC_1 | ADC_CCR_PRESC_0)
726#define LL_ADC_CLOCK_ASYNC_DIV8 (ADC_CCR_PRESC_2 )
727#define LL_ADC_CLOCK_ASYNC_DIV10 (ADC_CCR_PRESC_2 | ADC_CCR_PRESC_0)
728#define LL_ADC_CLOCK_ASYNC_DIV12 (ADC_CCR_PRESC_2 | ADC_CCR_PRESC_1 )
729#define LL_ADC_CLOCK_ASYNC_DIV16 (ADC_CCR_PRESC_2 | ADC_CCR_PRESC_1 | ADC_CCR_PRESC_0)
730#define LL_ADC_CLOCK_ASYNC_DIV32 (ADC_CCR_PRESC_3)
731#define LL_ADC_CLOCK_ASYNC_DIV64 (ADC_CCR_PRESC_3 | ADC_CCR_PRESC_0)
732#define LL_ADC_CLOCK_ASYNC_DIV128 (ADC_CCR_PRESC_3 | ADC_CCR_PRESC_1)
733#define LL_ADC_CLOCK_ASYNC_DIV256 (ADC_CCR_PRESC_3 | ADC_CCR_PRESC_1 | ADC_CCR_PRESC_0)
747#define LL_ADC_PATH_INTERNAL_NONE (0x00000000UL)
748#define LL_ADC_PATH_INTERNAL_VREFINT (ADC_CCR_VREFEN)
749#define LL_ADC_PATH_INTERNAL_TEMPSENSOR (ADC_CCR_TSEN)
750#define LL_ADC_PATH_INTERNAL_VBAT (ADC_CCR_VBATEN)
759#define LL_ADC_BOOST_MODE_6MHZ25 (0x00000000UL)
760#define LL_ADC_BOOST_MODE_12MHZ5 ( ADC_CR_BOOST_0)
761#define LL_ADC_BOOST_MODE_20MHZ ( ADC_CR_BOOST_1 )
762#define LL_ADC_BOOST_MODE_25MHZ ((ADC_CR_BOOST_0 <<2) | ADC_CR_BOOST_1 )
763#define LL_ADC_BOOST_MODE_50MHZ ((ADC_CR_BOOST_0 <<2) | ADC_CR_BOOST_1 | ADC_CR_BOOST_0)
772#define LL_ADC_CALIB_OFFSET (ADC_CALIB_FACTOR_OFFSET_REGOFFSET)
773#define LL_ADC_CALIB_LINEARITY (ADC_CALIB_FACTOR_LINEARITY_REGOFFSET)
774#define LL_ADC_CALIB_OFFSET_LINEARITY (ADC_CALIB_FACTOR_LINEARITY_REGOFFSET | ADC_CR_ADCALLIN)
783#define LL_ADC_CALIB_LINEARITY_WORD1 (ADC_CR_LINCALRDYW1)
784#define LL_ADC_CALIB_LINEARITY_WORD2 (ADC_CR_LINCALRDYW2)
785#define LL_ADC_CALIB_LINEARITY_WORD3 (ADC_CR_LINCALRDYW3)
786#define LL_ADC_CALIB_LINEARITY_WORD4 (ADC_CR_LINCALRDYW4)
787#define LL_ADC_CALIB_LINEARITY_WORD5 (ADC_CR_LINCALRDYW5)
788#define LL_ADC_CALIB_LINEARITY_WORD6 (ADC_CR_LINCALRDYW6)
797#define LL_ADC_RESOLUTION_16B (0x00000000UL)
798#define LL_ADC_RESOLUTION_14B ( ADC_CFGR_RES_0)
799#define LL_ADC_RESOLUTION_12B ( ADC_CFGR_RES_1 )
800#define LL_ADC_RESOLUTION_10B ( ADC_CFGR_RES_1 | ADC_CFGR_RES_0)
802#if defined (ADC_VER_V5_X)
803#define LL_ADC_RESOLUTION_14B_OPT (ADC_CFGR_RES_2 | ADC_CFGR_RES_0)
804#define LL_ADC_RESOLUTION_12B_OPT (ADC_CFGR_RES_2 | ADC_CFGR_RES_1 )
807#if defined (ADC_VER_V5_3) || defined(ADC_VER_V5_V90)
808#define LL_ADC_RESOLUTION_8B (ADC_CFGR_RES_2|ADC_CFGR_RES_1 | ADC_CFGR_RES_0)
810#define LL_ADC_RESOLUTION_8B (ADC_CFGR_RES_2 )
815#if defined(ADC_VER_V5_V90)
816#define LL_ADC_RESOLUTION_6B (ADC3_CFGR_RES_1 | ADC3_CFGR_RES_0)
822#if defined(ADC_VER_V5_V90)
827#define LL_ADC_DATA_ALIGN_RIGHT (0x00000000UL)
828#define LL_ADC_DATA_ALIGN_LEFT (ADC3_CFGR_ALIGN)
839#define LL_ADC_LEFT_BIT_SHIFT_NONE (0x00000000UL)
840#define LL_ADC_LEFT_BIT_SHIFT_1 (ADC_CFGR2_LSHIFT_0)
841#define LL_ADC_LEFT_BIT_SHIFT_2 (ADC_CFGR2_LSHIFT_1)
842#define LL_ADC_LEFT_BIT_SHIFT_3 (ADC_CFGR2_LSHIFT_1 | ADC_CFGR2_LSHIFT_0)
843#define LL_ADC_LEFT_BIT_SHIFT_4 (ADC_CFGR2_LSHIFT_2)
844#define LL_ADC_LEFT_BIT_SHIFT_5 (ADC_CFGR2_LSHIFT_2 | ADC_CFGR2_LSHIFT_0)
845#define LL_ADC_LEFT_BIT_SHIFT_6 (ADC_CFGR2_LSHIFT_2 | ADC_CFGR2_LSHIFT_1)
846#define LL_ADC_LEFT_BIT_SHIFT_7 (ADC_CFGR2_LSHIFT_2 | ADC_CFGR2_LSHIFT_1 | ADC_CFGR2_LSHIFT_0)
847#define LL_ADC_LEFT_BIT_SHIFT_8 (ADC_CFGR2_LSHIFT_3)
848#define LL_ADC_LEFT_BIT_SHIFT_9 (ADC_CFGR2_LSHIFT_3 | ADC_CFGR2_LSHIFT_0)
849#define LL_ADC_LEFT_BIT_SHIFT_10 (ADC_CFGR2_LSHIFT_3 | ADC_CFGR2_LSHIFT_1)
850#define LL_ADC_LEFT_BIT_SHIFT_11 (ADC_CFGR2_LSHIFT_3 | ADC_CFGR2_LSHIFT_1 | ADC_CFGR2_LSHIFT_0)
851#define LL_ADC_LEFT_BIT_SHIFT_12 (ADC_CFGR2_LSHIFT_3 | ADC_CFGR2_LSHIFT_2)
852#define LL_ADC_LEFT_BIT_SHIFT_13 (ADC_CFGR2_LSHIFT_3 | ADC_CFGR2_LSHIFT_2 | ADC_CFGR2_LSHIFT_0)
853#define LL_ADC_LEFT_BIT_SHIFT_14 (ADC_CFGR2_LSHIFT_3 | ADC_CFGR2_LSHIFT_2 | ADC_CFGR2_LSHIFT_1)
854#define LL_ADC_LEFT_BIT_SHIFT_15 (ADC_CFGR2_LSHIFT_3 | ADC_CFGR2_LSHIFT_2 | ADC_CFGR2_LSHIFT_1 | ADC_CFGR2_LSHIFT_0)
863#define LL_ADC_LP_MODE_NONE (0x00000000UL)
864#define LL_ADC_LP_AUTOWAIT (ADC_CFGR_AUTDLY)
873#define LL_ADC_OFFSET_1 ADC_OFR1_REGOFFSET
874#define LL_ADC_OFFSET_2 ADC_OFR2_REGOFFSET
875#define LL_ADC_OFFSET_3 ADC_OFR3_REGOFFSET
876#define LL_ADC_OFFSET_4 ADC_OFR4_REGOFFSET
885#define LL_ADC_OFFSET_SIGNED_SATURATION_DISABLE (0x00000000UL)
886#define LL_ADC_OFFSET_SIGNED_SATURATION_ENABLE (ADC_OFR1_SSATE)
895#define LL_ADC_OFFSET_RSHIFT_DISABLE (0x00000000UL)
896#define LL_ADC_OFFSET_RSHIFT_ENABLE (ADC_CFGR2_RSHIFT1)
900#if defined(ADC_VER_V5_V90)
905#define LL_ADC_OFFSET_SATURATION_DISABLE (0x00000000UL)
906#define LL_ADC_OFFSET_SATURATION_ENABLE (ADC3_OFR1_SATEN)
915#define LL_ADC_OFFSET_DISABLE (0x00000000UL)
916#define LL_ADC_OFFSET_ENABLE (ADC3_OFR1_OFFSET1_EN)
920#if defined(ADC_VER_V5_V90)
925#define LL_ADC_OFFSET_SIGN_NEGATIVE (0x00000000UL)
926#define LL_ADC_OFFSET_SIGN_POSITIVE (ADC3_OFR1_OFFSETPOS)
938#define LL_ADC_GROUP_REGULAR (0x00000001UL)
939#define LL_ADC_GROUP_INJECTED (0x00000002UL)
940#define LL_ADC_GROUP_REGULAR_INJECTED (0x00000003UL)
949#define LL_ADC_CHANNEL_0 (ADC_CHANNEL_0_NUMBER | ADC_CHANNEL_0_SMP | ADC_CHANNEL_0_BITFIELD )
950#define LL_ADC_CHANNEL_1 (ADC_CHANNEL_1_NUMBER | ADC_CHANNEL_1_SMP | ADC_CHANNEL_1_BITFIELD )
951#define LL_ADC_CHANNEL_2 (ADC_CHANNEL_2_NUMBER | ADC_CHANNEL_2_SMP | ADC_CHANNEL_2_BITFIELD )
952#define LL_ADC_CHANNEL_3 (ADC_CHANNEL_3_NUMBER | ADC_CHANNEL_3_SMP | ADC_CHANNEL_3_BITFIELD )
953#define LL_ADC_CHANNEL_4 (ADC_CHANNEL_4_NUMBER | ADC_CHANNEL_4_SMP | ADC_CHANNEL_4_BITFIELD )
954#define LL_ADC_CHANNEL_5 (ADC_CHANNEL_5_NUMBER | ADC_CHANNEL_5_SMP | ADC_CHANNEL_5_BITFIELD )
955#define LL_ADC_CHANNEL_6 (ADC_CHANNEL_6_NUMBER | ADC_CHANNEL_6_SMP | ADC_CHANNEL_6_BITFIELD )
956#define LL_ADC_CHANNEL_7 (ADC_CHANNEL_7_NUMBER | ADC_CHANNEL_7_SMP | ADC_CHANNEL_7_BITFIELD )
957#define LL_ADC_CHANNEL_8 (ADC_CHANNEL_8_NUMBER | ADC_CHANNEL_8_SMP | ADC_CHANNEL_8_BITFIELD )
958#define LL_ADC_CHANNEL_9 (ADC_CHANNEL_9_NUMBER | ADC_CHANNEL_9_SMP | ADC_CHANNEL_9_BITFIELD )
959#define LL_ADC_CHANNEL_10 (ADC_CHANNEL_10_NUMBER | ADC_CHANNEL_10_SMP | ADC_CHANNEL_10_BITFIELD)
960#define LL_ADC_CHANNEL_11 (ADC_CHANNEL_11_NUMBER | ADC_CHANNEL_11_SMP | ADC_CHANNEL_11_BITFIELD)
961#define LL_ADC_CHANNEL_12 (ADC_CHANNEL_12_NUMBER | ADC_CHANNEL_12_SMP | ADC_CHANNEL_12_BITFIELD)
962#define LL_ADC_CHANNEL_13 (ADC_CHANNEL_13_NUMBER | ADC_CHANNEL_13_SMP | ADC_CHANNEL_13_BITFIELD)
963#define LL_ADC_CHANNEL_14 (ADC_CHANNEL_14_NUMBER | ADC_CHANNEL_14_SMP | ADC_CHANNEL_14_BITFIELD)
964#define LL_ADC_CHANNEL_15 (ADC_CHANNEL_15_NUMBER | ADC_CHANNEL_15_SMP | ADC_CHANNEL_15_BITFIELD)
965#define LL_ADC_CHANNEL_16 (ADC_CHANNEL_16_NUMBER | ADC_CHANNEL_16_SMP | ADC_CHANNEL_16_BITFIELD)
966#define LL_ADC_CHANNEL_17 (ADC_CHANNEL_17_NUMBER | ADC_CHANNEL_17_SMP | ADC_CHANNEL_17_BITFIELD)
967#define LL_ADC_CHANNEL_18 (ADC_CHANNEL_18_NUMBER | ADC_CHANNEL_18_SMP | ADC_CHANNEL_18_BITFIELD)
968#define LL_ADC_CHANNEL_19 (ADC_CHANNEL_19_NUMBER | ADC_CHANNEL_19_SMP | ADC_CHANNEL_19_BITFIELD)
970#if defined(ADC_VER_V5_V90)
971#define LL_ADC_CHANNEL_VREFINT (LL_ADC_CHANNEL_18 | ADC_CHANNEL_ID_INTERNAL_CH)
972#define LL_ADC_CHANNEL_TEMPSENSOR (LL_ADC_CHANNEL_17 | ADC_CHANNEL_ID_INTERNAL_CH)
973#define LL_ADC_CHANNEL_VBAT (LL_ADC_CHANNEL_16 | ADC_CHANNEL_ID_INTERNAL_CH)
975#define LL_ADC_CHANNEL_VREFINT (LL_ADC_CHANNEL_19 | ADC_CHANNEL_ID_INTERNAL_CH)
976#define LL_ADC_CHANNEL_TEMPSENSOR (LL_ADC_CHANNEL_18 | ADC_CHANNEL_ID_INTERNAL_CH)
977#define LL_ADC_CHANNEL_VBAT (LL_ADC_CHANNEL_17 | ADC_CHANNEL_ID_INTERNAL_CH)
981#define LL_ADC_CHANNEL_VREFINT (LL_ADC_CHANNEL_19 | ADC_CHANNEL_ID_INTERNAL_CH)
982#define LL_ADC_CHANNEL_TEMPSENSOR (LL_ADC_CHANNEL_18 | ADC_CHANNEL_ID_INTERNAL_CH)
983#define LL_ADC_CHANNEL_VBAT (LL_ADC_CHANNEL_14 | ADC_CHANNEL_ID_INTERNAL_CH)
985#define LL_ADC_CHANNEL_DAC1CH1_ADC2 (LL_ADC_CHANNEL_16 | ADC_CHANNEL_ID_INTERNAL_CH)
986#define LL_ADC_CHANNEL_DAC1CH2_ADC2 (LL_ADC_CHANNEL_17 | ADC_CHANNEL_ID_INTERNAL_CH)
989#define LL_ADC_CHANNEL_DAC2CH1_ADC2 (LL_ADC_CHANNEL_15 | ADC_CHANNEL_ID_INTERNAL_CH)
999#define LL_ADC_REG_TRIG_SOFTWARE (0x00000000UL)
1000#define LL_ADC_REG_TRIG_EXT_TIM1_CH1 (ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1001#define LL_ADC_REG_TRIG_EXT_TIM1_CH2 (ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1002#define LL_ADC_REG_TRIG_EXT_TIM1_CH3 (ADC_CFGR_EXTSEL_1 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1003#define LL_ADC_REG_TRIG_EXT_TIM2_CH2 (ADC_CFGR_EXTSEL_1 | ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1004#define LL_ADC_REG_TRIG_EXT_TIM3_TRGO (ADC_CFGR_EXTSEL_2 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1005#define LL_ADC_REG_TRIG_EXT_TIM4_CH4 (ADC_CFGR_EXTSEL_2 | ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1006#define LL_ADC_REG_TRIG_EXT_EXTI_LINE11 (ADC_CFGR_EXTSEL_2 | ADC_CFGR_EXTSEL_1 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1007#define LL_ADC_REG_TRIG_EXT_TIM8_TRGO (ADC_CFGR_EXTSEL_2 | ADC_CFGR_EXTSEL_1 | ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1008#define LL_ADC_REG_TRIG_EXT_TIM8_TRGO2 (ADC_CFGR_EXTSEL_3 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1009#define LL_ADC_REG_TRIG_EXT_TIM1_TRGO (ADC_CFGR_EXTSEL_3 | ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1010#define LL_ADC_REG_TRIG_EXT_TIM1_TRGO2 (ADC_CFGR_EXTSEL_3 | ADC_CFGR_EXTSEL_1 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1011#define LL_ADC_REG_TRIG_EXT_TIM2_TRGO (ADC_CFGR_EXTSEL_3 | ADC_CFGR_EXTSEL_1 | ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1012#define LL_ADC_REG_TRIG_EXT_TIM4_TRGO (ADC_CFGR_EXTSEL_3 | ADC_CFGR_EXTSEL_2 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1013#define LL_ADC_REG_TRIG_EXT_TIM6_TRGO (ADC_CFGR_EXTSEL_3 | ADC_CFGR_EXTSEL_2 | ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1014#define LL_ADC_REG_TRIG_EXT_TIM15_TRGO (ADC_CFGR_EXTSEL_3 | ADC_CFGR_EXTSEL_2 | ADC_CFGR_EXTSEL_1 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1015#define LL_ADC_REG_TRIG_EXT_TIM3_CH4 (ADC_CFGR_EXTSEL_3 | ADC_CFGR_EXTSEL_2 | ADC_CFGR_EXTSEL_1 | ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1016#define LL_ADC_REG_TRIG_EXT_HRTIM_TRG1 (ADC_CFGR_EXTSEL_4 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1017#define LL_ADC_REG_TRIG_EXT_HRTIM_TRG3 (ADC_CFGR_EXTSEL_4 | ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1018#define LL_ADC_REG_TRIG_EXT_LPTIM1_OUT (ADC_CFGR_EXTSEL_4 | ADC_CFGR_EXTSEL_1 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1019#define LL_ADC_REG_TRIG_EXT_LPTIM2_OUT (ADC_CFGR_EXTSEL_4 | ADC_CFGR_EXTSEL_1 | ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1020#define LL_ADC_REG_TRIG_EXT_LPTIM3_OUT (ADC_CFGR_EXTSEL_4 | ADC_CFGR_EXTSEL_2 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1022#define LL_ADC_REG_TRIG_EXT_TIM23_TRGO (ADC_CFGR_EXTSEL_4 | ADC_CFGR_EXTSEL_2 | ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1025#define LL_ADC_REG_TRIG_EXT_TIM24_TRGO (ADC_CFGR_EXTSEL_4 | ADC_CFGR_EXTSEL_2 | ADC_CFGR_EXTSEL_1 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1035#define LL_ADC_REG_TRIG_EXT_RISING ( ADC_CFGR_EXTEN_0)
1036#define LL_ADC_REG_TRIG_EXT_FALLING (ADC_CFGR_EXTEN_1 )
1037#define LL_ADC_REG_TRIG_EXT_RISINGFALLING (ADC_CFGR_EXTEN_1 | ADC_CFGR_EXTEN_0)
1041#if defined(ADC_VER_V5_V90)
1046#define LL_ADC_REG_SAMPLING_MODE_NORMAL (0x00000000UL)
1047#define LL_ADC_REG_SAMPLING_MODE_BULB (ADC3_CFGR2_BULB)
1049#define LL_ADC_REG_SAMPLING_MODE_TRIGGER_CONTROLED (ADC3_CFGR2_SMPTRIG)
1061#define LL_ADC_REG_CONV_SINGLE (0x00000000UL)
1062#define LL_ADC_REG_CONV_CONTINUOUS (ADC_CFGR_CONT)
1071#define LL_ADC_REG_DR_TRANSFER (0x00000000UL)
1072#define LL_ADC_REG_DMA_TRANSFER_LIMITED ( ADC_CFGR_DMNGT_0)
1073#define LL_ADC_REG_DMA_TRANSFER_UNLIMITED (ADC_CFGR_DMNGT_1 | ADC_CFGR_DMNGT_0)
1074#define LL_ADC_REG_DFSDM_TRANSFER (ADC_CFGR_DMNGT_1 )
1079#if defined(ADC_VER_V5_V90)
1085#define LL_ADC3_REG_DMA_TRANSFER_NONE (0x00000000UL)
1086#define LL_ADC3_REG_DMA_TRANSFER_LIMITED ( ADC3_CFGR_DMAEN)
1087#define LL_ADC3_REG_DMA_TRANSFER_UNLIMITED (ADC3_CFGR_DMACFG | ADC3_CFGR_DMAEN)
1097#define LL_ADC_REG_OVR_DATA_PRESERVED (0x00000000UL)
1098#define LL_ADC_REG_OVR_DATA_OVERWRITTEN (ADC_CFGR_OVRMOD)
1107#define LL_ADC_REG_SEQ_SCAN_DISABLE (0x00000000UL)
1108#define LL_ADC_REG_SEQ_SCAN_ENABLE_2RANKS ( ADC_SQR1_L_0)
1109#define LL_ADC_REG_SEQ_SCAN_ENABLE_3RANKS ( ADC_SQR1_L_1 )
1110#define LL_ADC_REG_SEQ_SCAN_ENABLE_4RANKS ( ADC_SQR1_L_1 | ADC_SQR1_L_0)
1111#define LL_ADC_REG_SEQ_SCAN_ENABLE_5RANKS ( ADC_SQR1_L_2 )
1112#define LL_ADC_REG_SEQ_SCAN_ENABLE_6RANKS ( ADC_SQR1_L_2 | ADC_SQR1_L_0)
1113#define LL_ADC_REG_SEQ_SCAN_ENABLE_7RANKS ( ADC_SQR1_L_2 | ADC_SQR1_L_1 )
1114#define LL_ADC_REG_SEQ_SCAN_ENABLE_8RANKS ( ADC_SQR1_L_2 | ADC_SQR1_L_1 | ADC_SQR1_L_0)
1115#define LL_ADC_REG_SEQ_SCAN_ENABLE_9RANKS (ADC_SQR1_L_3 )
1116#define LL_ADC_REG_SEQ_SCAN_ENABLE_10RANKS (ADC_SQR1_L_3 | ADC_SQR1_L_0)
1117#define LL_ADC_REG_SEQ_SCAN_ENABLE_11RANKS (ADC_SQR1_L_3 | ADC_SQR1_L_1 )
1118#define LL_ADC_REG_SEQ_SCAN_ENABLE_12RANKS (ADC_SQR1_L_3 | ADC_SQR1_L_1 | ADC_SQR1_L_0)
1119#define LL_ADC_REG_SEQ_SCAN_ENABLE_13RANKS (ADC_SQR1_L_3 | ADC_SQR1_L_2 )
1120#define LL_ADC_REG_SEQ_SCAN_ENABLE_14RANKS (ADC_SQR1_L_3 | ADC_SQR1_L_2 | ADC_SQR1_L_0)
1121#define LL_ADC_REG_SEQ_SCAN_ENABLE_15RANKS (ADC_SQR1_L_3 | ADC_SQR1_L_2 | ADC_SQR1_L_1 )
1122#define LL_ADC_REG_SEQ_SCAN_ENABLE_16RANKS (ADC_SQR1_L_3 | ADC_SQR1_L_2 | ADC_SQR1_L_1 | ADC_SQR1_L_0)
1131#define LL_ADC_REG_SEQ_DISCONT_DISABLE (0x00000000UL)
1132#define LL_ADC_REG_SEQ_DISCONT_1RANK ( ADC_CFGR_DISCEN)
1133#define LL_ADC_REG_SEQ_DISCONT_2RANKS ( ADC_CFGR_DISCNUM_0 | ADC_CFGR_DISCEN)
1134#define LL_ADC_REG_SEQ_DISCONT_3RANKS ( ADC_CFGR_DISCNUM_1 | ADC_CFGR_DISCEN)
1135#define LL_ADC_REG_SEQ_DISCONT_4RANKS ( ADC_CFGR_DISCNUM_1 | ADC_CFGR_DISCNUM_0 | ADC_CFGR_DISCEN)
1136#define LL_ADC_REG_SEQ_DISCONT_5RANKS (ADC_CFGR_DISCNUM_2 | ADC_CFGR_DISCEN)
1137#define LL_ADC_REG_SEQ_DISCONT_6RANKS (ADC_CFGR_DISCNUM_2 | ADC_CFGR_DISCNUM_0 | ADC_CFGR_DISCEN)
1138#define LL_ADC_REG_SEQ_DISCONT_7RANKS (ADC_CFGR_DISCNUM_2 | ADC_CFGR_DISCNUM_1 | ADC_CFGR_DISCEN)
1139#define LL_ADC_REG_SEQ_DISCONT_8RANKS (ADC_CFGR_DISCNUM_2 | ADC_CFGR_DISCNUM_1 | ADC_CFGR_DISCNUM_0 | ADC_CFGR_DISCEN)
1148#define LL_ADC_REG_RANK_1 (ADC_SQR1_REGOFFSET | ADC_REG_RANK_1_SQRX_BITOFFSET_POS)
1149#define LL_ADC_REG_RANK_2 (ADC_SQR1_REGOFFSET | ADC_REG_RANK_2_SQRX_BITOFFSET_POS)
1150#define LL_ADC_REG_RANK_3 (ADC_SQR1_REGOFFSET | ADC_REG_RANK_3_SQRX_BITOFFSET_POS)
1151#define LL_ADC_REG_RANK_4 (ADC_SQR1_REGOFFSET | ADC_REG_RANK_4_SQRX_BITOFFSET_POS)
1152#define LL_ADC_REG_RANK_5 (ADC_SQR2_REGOFFSET | ADC_REG_RANK_5_SQRX_BITOFFSET_POS)
1153#define LL_ADC_REG_RANK_6 (ADC_SQR2_REGOFFSET | ADC_REG_RANK_6_SQRX_BITOFFSET_POS)
1154#define LL_ADC_REG_RANK_7 (ADC_SQR2_REGOFFSET | ADC_REG_RANK_7_SQRX_BITOFFSET_POS)
1155#define LL_ADC_REG_RANK_8 (ADC_SQR2_REGOFFSET | ADC_REG_RANK_8_SQRX_BITOFFSET_POS)
1156#define LL_ADC_REG_RANK_9 (ADC_SQR2_REGOFFSET | ADC_REG_RANK_9_SQRX_BITOFFSET_POS)
1157#define LL_ADC_REG_RANK_10 (ADC_SQR3_REGOFFSET | ADC_REG_RANK_10_SQRX_BITOFFSET_POS)
1158#define LL_ADC_REG_RANK_11 (ADC_SQR3_REGOFFSET | ADC_REG_RANK_11_SQRX_BITOFFSET_POS)
1159#define LL_ADC_REG_RANK_12 (ADC_SQR3_REGOFFSET | ADC_REG_RANK_12_SQRX_BITOFFSET_POS)
1160#define LL_ADC_REG_RANK_13 (ADC_SQR3_REGOFFSET | ADC_REG_RANK_13_SQRX_BITOFFSET_POS)
1161#define LL_ADC_REG_RANK_14 (ADC_SQR3_REGOFFSET | ADC_REG_RANK_14_SQRX_BITOFFSET_POS)
1162#define LL_ADC_REG_RANK_15 (ADC_SQR4_REGOFFSET | ADC_REG_RANK_15_SQRX_BITOFFSET_POS)
1163#define LL_ADC_REG_RANK_16 (ADC_SQR4_REGOFFSET | ADC_REG_RANK_16_SQRX_BITOFFSET_POS)
1172#define LL_ADC_INJ_TRIG_SOFTWARE (0x00000000UL)
1173#define LL_ADC_INJ_TRIG_EXT_TIM1_TRGO (ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1174#define LL_ADC_INJ_TRIG_EXT_TIM1_CH4 (ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1175#define LL_ADC_INJ_TRIG_EXT_TIM2_TRGO (ADC_JSQR_JEXTSEL_1 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1176#define LL_ADC_INJ_TRIG_EXT_TIM2_CH1 (ADC_JSQR_JEXTSEL_1 | ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1177#define LL_ADC_INJ_TRIG_EXT_TIM3_CH4 (ADC_JSQR_JEXTSEL_2 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1178#define LL_ADC_INJ_TRIG_EXT_TIM4_TRGO (ADC_JSQR_JEXTSEL_2 | ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1179#define LL_ADC_INJ_TRIG_EXT_EXTI_LINE15 (ADC_JSQR_JEXTSEL_2 | ADC_JSQR_JEXTSEL_1 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1180#define LL_ADC_INJ_TRIG_EXT_TIM8_CH4 (ADC_JSQR_JEXTSEL_2 | ADC_JSQR_JEXTSEL_1 | ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1181#define LL_ADC_INJ_TRIG_EXT_TIM1_TRGO2 (ADC_JSQR_JEXTSEL_3 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1182#define LL_ADC_INJ_TRIG_EXT_TIM8_TRGO (ADC_JSQR_JEXTSEL_3 | ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1183#define LL_ADC_INJ_TRIG_EXT_TIM8_TRGO2 (ADC_JSQR_JEXTSEL_3 | ADC_JSQR_JEXTSEL_1 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1184#define LL_ADC_INJ_TRIG_EXT_TIM3_CH3 (ADC_JSQR_JEXTSEL_3 | ADC_JSQR_JEXTSEL_1 | ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1185#define LL_ADC_INJ_TRIG_EXT_TIM3_TRGO (ADC_JSQR_JEXTSEL_3 | ADC_JSQR_JEXTSEL_2 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1186#define LL_ADC_INJ_TRIG_EXT_TIM3_CH1 (ADC_JSQR_JEXTSEL_3 | ADC_JSQR_JEXTSEL_2 | ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1187#define LL_ADC_INJ_TRIG_EXT_TIM6_TRGO (ADC_JSQR_JEXTSEL_3 | ADC_JSQR_JEXTSEL_2 | ADC_JSQR_JEXTSEL_1 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1188#define LL_ADC_INJ_TRIG_EXT_TIM15_TRGO (ADC_JSQR_JEXTSEL_3 | ADC_JSQR_JEXTSEL_2 | ADC_JSQR_JEXTSEL_1 | ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1190#define LL_ADC_INJ_TRIG_EXT_HRTIM_TRG2 (ADC_JSQR_JEXTSEL_4 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1191#define LL_ADC_INJ_TRIG_EXT_HRTIM_TRG4 (ADC_JSQR_JEXTSEL_4 | ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1193#define LL_ADC_INJ_TRIG_EXT_LPTIM1_OUT (ADC_JSQR_JEXTSEL_4 | ADC_JSQR_JEXTSEL_1 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1194#define LL_ADC_INJ_TRIG_EXT_LPTIM2_OUT (ADC_JSQR_JEXTSEL_4 | ADC_JSQR_JEXTSEL_1 | ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1195#define LL_ADC_INJ_TRIG_EXT_LPTIM3_OUT (ADC_JSQR_JEXTSEL_4 | ADC_JSQR_JEXTSEL_2 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1196#define LL_ADC_INJ_TRIG_EXT_TIM23_TRGO (ADC_JSQR_JEXTSEL_4 | ADC_JSQR_JEXTSEL_2 | ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1197#define LL_ADC_INJ_TRIG_EXT_TIM24_TRGO (ADC_JSQR_JEXTSEL_4 | ADC_JSQR_JEXTSEL_2 | ADC_JSQR_JEXTSEL_1 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1206#define LL_ADC_INJ_TRIG_EXT_RISING ( ADC_JSQR_JEXTEN_0)
1207#define LL_ADC_INJ_TRIG_EXT_FALLING (ADC_JSQR_JEXTEN_1 )
1208#define LL_ADC_INJ_TRIG_EXT_RISINGFALLING (ADC_JSQR_JEXTEN_1 | ADC_JSQR_JEXTEN_0)
1217#define LL_ADC_INJ_TRIG_INDEPENDENT (0x00000000UL)
1218#define LL_ADC_INJ_TRIG_FROM_GRP_REGULAR (ADC_CFGR_JAUTO)
1227#define LL_ADC_INJ_QUEUE_2CONTEXTS_LAST_ACTIVE (0x00000000UL)
1228#define LL_ADC_INJ_QUEUE_2CONTEXTS_END_EMPTY (ADC_CFGR_JQM)
1229#define LL_ADC_INJ_QUEUE_DISABLE (ADC_CFGR_JQDIS)
1238#define LL_ADC_INJ_SEQ_SCAN_DISABLE (0x00000000UL)
1239#define LL_ADC_INJ_SEQ_SCAN_ENABLE_2RANKS ( ADC_JSQR_JL_0)
1240#define LL_ADC_INJ_SEQ_SCAN_ENABLE_3RANKS (ADC_JSQR_JL_1 )
1241#define LL_ADC_INJ_SEQ_SCAN_ENABLE_4RANKS (ADC_JSQR_JL_1 | ADC_JSQR_JL_0)
1250#define LL_ADC_INJ_SEQ_DISCONT_DISABLE (0x00000000UL)
1251#define LL_ADC_INJ_SEQ_DISCONT_1RANK (ADC_CFGR_JDISCEN)
1260#define LL_ADC_INJ_RANK_1 (ADC_JDR1_REGOFFSET | ADC_INJ_RANK_1_JSQR_BITOFFSET_POS)
1261#define LL_ADC_INJ_RANK_2 (ADC_JDR2_REGOFFSET | ADC_INJ_RANK_2_JSQR_BITOFFSET_POS)
1262#define LL_ADC_INJ_RANK_3 (ADC_JDR3_REGOFFSET | ADC_INJ_RANK_3_JSQR_BITOFFSET_POS)
1263#define LL_ADC_INJ_RANK_4 (ADC_JDR4_REGOFFSET | ADC_INJ_RANK_4_JSQR_BITOFFSET_POS)
1272#define LL_ADC_SAMPLINGTIME_1CYCLE_5 (0x00000000UL)
1273#define LL_ADC_SAMPLINGTIME_2CYCLES_5 ( ADC_SMPR2_SMP10_0)
1274#define LL_ADC_SAMPLINGTIME_8CYCLES_5 ( ADC_SMPR2_SMP10_1 )
1275#define LL_ADC_SAMPLINGTIME_16CYCLES_5 ( ADC_SMPR2_SMP10_1 | ADC_SMPR2_SMP10_0)
1276#define LL_ADC_SAMPLINGTIME_32CYCLES_5 (ADC_SMPR2_SMP10_2 )
1277#define LL_ADC_SAMPLINGTIME_64CYCLES_5 (ADC_SMPR2_SMP10_2 | ADC_SMPR2_SMP10_0)
1278#define LL_ADC_SAMPLINGTIME_387CYCLES_5 (ADC_SMPR2_SMP10_2 | ADC_SMPR2_SMP10_1 )
1279#define LL_ADC_SAMPLINGTIME_810CYCLES_5 (ADC_SMPR2_SMP10_2 | ADC_SMPR2_SMP10_1 | ADC_SMPR2_SMP10_0)
1283#if defined(ADC_VER_V5_V90)
1288#define LL_ADC_SAMPLINGTIME_ADC3_2CYCLES_5 (0x00000000UL)
1289#define LL_ADC_SAMPLINGTIME_ADC3_6CYCLES_5 ( ADC_SMPR2_SMP10_0)
1290#define LL_ADC_SAMPLINGTIME_ADC3_12CYCLES_5 ( ADC_SMPR2_SMP10_1 )
1291#define LL_ADC_SAMPLINGTIME_ADC3_24CYCLES_5 ( ADC_SMPR2_SMP10_1 | ADC_SMPR2_SMP10_0)
1292#define LL_ADC_SAMPLINGTIME_ADC3_47CYCLES_5 (ADC_SMPR2_SMP10_2 )
1293#define LL_ADC_SAMPLINGTIME_ADC3_92CYCLES_5 (ADC_SMPR2_SMP10_2 | ADC_SMPR2_SMP10_0)
1294#define LL_ADC_SAMPLINGTIME_ADC3_247CYCLES_5 (ADC_SMPR2_SMP10_2 | ADC_SMPR2_SMP10_1 )
1295#define LL_ADC_SAMPLINGTIME_ADC3_640CYCLES_5 (ADC_SMPR2_SMP10_2 | ADC_SMPR2_SMP10_1 | ADC_SMPR2_SMP10_0)
1305#define LL_ADC_SINGLE_ENDED ( ADC_CALFACT_CALFACT_S)
1306#define LL_ADC_DIFFERENTIAL_ENDED (ADC_CR_ADCALDIF | ADC_CALFACT_CALFACT_D)
1307#define LL_ADC_BOTH_SINGLE_DIFF_ENDED (LL_ADC_SINGLE_ENDED | LL_ADC_DIFFERENTIAL_ENDED)
1316#define LL_ADC_AWD1 (ADC_AWD_CR1_CHANNEL_MASK | ADC_AWD_CR1_REGOFFSET)
1317#define LL_ADC_AWD2 (ADC_AWD_CR23_CHANNEL_MASK | ADC_AWD_CR2_REGOFFSET)
1318#define LL_ADC_AWD3 (ADC_AWD_CR23_CHANNEL_MASK | ADC_AWD_CR3_REGOFFSET)
1327#define LL_ADC_AWD_DISABLE (0x00000000UL)
1328#define LL_ADC_AWD_ALL_CHANNELS_REG (ADC_AWD_CR23_CHANNEL_MASK | ADC_CFGR_AWD1EN )
1329#define LL_ADC_AWD_ALL_CHANNELS_INJ (ADC_AWD_CR23_CHANNEL_MASK | ADC_CFGR_JAWD1EN )
1330#define LL_ADC_AWD_ALL_CHANNELS_REG_INJ (ADC_AWD_CR23_CHANNEL_MASK | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN )
1331#define LL_ADC_AWD_CHANNEL_0_REG ((LL_ADC_CHANNEL_0 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1332#define LL_ADC_AWD_CHANNEL_0_INJ ((LL_ADC_CHANNEL_0 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1333#define LL_ADC_AWD_CHANNEL_0_REG_INJ ((LL_ADC_CHANNEL_0 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1334#define LL_ADC_AWD_CHANNEL_1_REG ((LL_ADC_CHANNEL_1 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1335#define LL_ADC_AWD_CHANNEL_1_INJ ((LL_ADC_CHANNEL_1 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1336#define LL_ADC_AWD_CHANNEL_1_REG_INJ ((LL_ADC_CHANNEL_1 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1337#define LL_ADC_AWD_CHANNEL_2_REG ((LL_ADC_CHANNEL_2 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1338#define LL_ADC_AWD_CHANNEL_2_INJ ((LL_ADC_CHANNEL_2 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1339#define LL_ADC_AWD_CHANNEL_2_REG_INJ ((LL_ADC_CHANNEL_2 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1340#define LL_ADC_AWD_CHANNEL_3_REG ((LL_ADC_CHANNEL_3 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1341#define LL_ADC_AWD_CHANNEL_3_INJ ((LL_ADC_CHANNEL_3 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1342#define LL_ADC_AWD_CHANNEL_3_REG_INJ ((LL_ADC_CHANNEL_3 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1343#define LL_ADC_AWD_CHANNEL_4_REG ((LL_ADC_CHANNEL_4 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1344#define LL_ADC_AWD_CHANNEL_4_INJ ((LL_ADC_CHANNEL_4 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1345#define LL_ADC_AWD_CHANNEL_4_REG_INJ ((LL_ADC_CHANNEL_4 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1346#define LL_ADC_AWD_CHANNEL_5_REG ((LL_ADC_CHANNEL_5 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1347#define LL_ADC_AWD_CHANNEL_5_INJ ((LL_ADC_CHANNEL_5 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1348#define LL_ADC_AWD_CHANNEL_5_REG_INJ ((LL_ADC_CHANNEL_5 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1349#define LL_ADC_AWD_CHANNEL_6_REG ((LL_ADC_CHANNEL_6 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1350#define LL_ADC_AWD_CHANNEL_6_INJ ((LL_ADC_CHANNEL_6 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1351#define LL_ADC_AWD_CHANNEL_6_REG_INJ ((LL_ADC_CHANNEL_6 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1352#define LL_ADC_AWD_CHANNEL_7_REG ((LL_ADC_CHANNEL_7 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1353#define LL_ADC_AWD_CHANNEL_7_INJ ((LL_ADC_CHANNEL_7 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1354#define LL_ADC_AWD_CHANNEL_7_REG_INJ ((LL_ADC_CHANNEL_7 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1355#define LL_ADC_AWD_CHANNEL_8_REG ((LL_ADC_CHANNEL_8 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1356#define LL_ADC_AWD_CHANNEL_8_INJ ((LL_ADC_CHANNEL_8 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1357#define LL_ADC_AWD_CHANNEL_8_REG_INJ ((LL_ADC_CHANNEL_8 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1358#define LL_ADC_AWD_CHANNEL_9_REG ((LL_ADC_CHANNEL_9 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1359#define LL_ADC_AWD_CHANNEL_9_INJ ((LL_ADC_CHANNEL_9 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1360#define LL_ADC_AWD_CHANNEL_9_REG_INJ ((LL_ADC_CHANNEL_9 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1361#define LL_ADC_AWD_CHANNEL_10_REG ((LL_ADC_CHANNEL_10 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1362#define LL_ADC_AWD_CHANNEL_10_INJ ((LL_ADC_CHANNEL_10 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1363#define LL_ADC_AWD_CHANNEL_10_REG_INJ ((LL_ADC_CHANNEL_10 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1364#define LL_ADC_AWD_CHANNEL_11_REG ((LL_ADC_CHANNEL_11 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1365#define LL_ADC_AWD_CHANNEL_11_INJ ((LL_ADC_CHANNEL_11 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1366#define LL_ADC_AWD_CHANNEL_11_REG_INJ ((LL_ADC_CHANNEL_11 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1367#define LL_ADC_AWD_CHANNEL_12_REG ((LL_ADC_CHANNEL_12 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1368#define LL_ADC_AWD_CHANNEL_12_INJ ((LL_ADC_CHANNEL_12 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1369#define LL_ADC_AWD_CHANNEL_12_REG_INJ ((LL_ADC_CHANNEL_12 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1370#define LL_ADC_AWD_CHANNEL_13_REG ((LL_ADC_CHANNEL_13 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1371#define LL_ADC_AWD_CHANNEL_13_INJ ((LL_ADC_CHANNEL_13 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1372#define LL_ADC_AWD_CHANNEL_13_REG_INJ ((LL_ADC_CHANNEL_13 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1373#define LL_ADC_AWD_CHANNEL_14_REG ((LL_ADC_CHANNEL_14 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1374#define LL_ADC_AWD_CHANNEL_14_INJ ((LL_ADC_CHANNEL_14 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1375#define LL_ADC_AWD_CHANNEL_14_REG_INJ ((LL_ADC_CHANNEL_14 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1376#define LL_ADC_AWD_CHANNEL_15_REG ((LL_ADC_CHANNEL_15 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1377#define LL_ADC_AWD_CHANNEL_15_INJ ((LL_ADC_CHANNEL_15 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1378#define LL_ADC_AWD_CHANNEL_15_REG_INJ ((LL_ADC_CHANNEL_15 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1379#define LL_ADC_AWD_CHANNEL_16_REG ((LL_ADC_CHANNEL_16 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1380#define LL_ADC_AWD_CHANNEL_16_INJ ((LL_ADC_CHANNEL_16 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1381#define LL_ADC_AWD_CHANNEL_16_REG_INJ ((LL_ADC_CHANNEL_16 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1382#define LL_ADC_AWD_CHANNEL_17_REG ((LL_ADC_CHANNEL_17 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1383#define LL_ADC_AWD_CHANNEL_17_INJ ((LL_ADC_CHANNEL_17 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1384#define LL_ADC_AWD_CHANNEL_17_REG_INJ ((LL_ADC_CHANNEL_17 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1385#define LL_ADC_AWD_CHANNEL_18_REG ((LL_ADC_CHANNEL_18 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1386#define LL_ADC_AWD_CHANNEL_18_INJ ((LL_ADC_CHANNEL_18 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1387#define LL_ADC_AWD_CHANNEL_18_REG_INJ ((LL_ADC_CHANNEL_18 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1388#define LL_ADC_AWD_CHANNEL_19_REG ((LL_ADC_CHANNEL_19 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1389#define LL_ADC_AWD_CHANNEL_19_INJ ((LL_ADC_CHANNEL_19 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1390#define LL_ADC_AWD_CHANNEL_19_REG_INJ ((LL_ADC_CHANNEL_19 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1391#define LL_ADC_AWD_CH_VREFINT_REG ((LL_ADC_CHANNEL_VREFINT & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1392#define LL_ADC_AWD_CH_VREFINT_INJ ((LL_ADC_CHANNEL_VREFINT & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1393#define LL_ADC_AWD_CH_VREFINT_REG_INJ ((LL_ADC_CHANNEL_VREFINT & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1394#define LL_ADC_AWD_CH_TEMPSENSOR_REG ((LL_ADC_CHANNEL_TEMPSENSOR & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1395#define LL_ADC_AWD_CH_TEMPSENSOR_INJ ((LL_ADC_CHANNEL_TEMPSENSOR & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1396#define LL_ADC_AWD_CH_TEMPSENSOR_REG_INJ ((LL_ADC_CHANNEL_TEMPSENSOR & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1397#define LL_ADC_AWD_CH_VBAT_REG ((LL_ADC_CHANNEL_VBAT & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1398#define LL_ADC_AWD_CH_VBAT_INJ ((LL_ADC_CHANNEL_VBAT & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1399#define LL_ADC_AWD_CH_VBAT_REG_INJ ((LL_ADC_CHANNEL_VBAT & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1400#define LL_ADC_AWD_CH_DAC1CH1_ADC2_REG ((LL_ADC_CHANNEL_DAC1CH1_ADC2 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1401#define LL_ADC_AWD_CH_DAC1CH1_ADC2_INJ ((LL_ADC_CHANNEL_DAC1CH1_ADC2 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1402#define LL_ADC_AWD_CH_DAC1CH1_ADC2_REG_INJ ((LL_ADC_CHANNEL_DAC1CH1_ADC2 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1403#define LL_ADC_AWD_CH_DAC1CH2_ADC2_REG ((LL_ADC_CHANNEL_DAC1CH2_ADC2 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1404#define LL_ADC_AWD_CH_DAC1CH2_ADC2_INJ ((LL_ADC_CHANNEL_DAC1CH2_ADC2 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1405#define LL_ADC_AWD_CH_DAC1CH2_ADC2_REG_INJ ((LL_ADC_CHANNEL_DAC1CH2_ADC2 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1414#define LL_ADC_AWD_THRESHOLD_HIGH (0x1UL)
1415#define LL_ADC_AWD_THRESHOLD_LOW (0x0UL)
1419#if defined(ADC_VER_V5_V90)
1424#define LL_ADC_AWD_FILTERING_NONE (0x00000000UL)
1425#define LL_ADC_AWD_FILTERING_2SAMPLES ( ADC3_TR1_AWDFILT_0)
1426#define LL_ADC_AWD_FILTERING_3SAMPLES ( ADC3_TR1_AWDFILT_1 )
1427#define LL_ADC_AWD_FILTERING_4SAMPLES ( ADC3_TR1_AWDFILT_1 | ADC3_TR1_AWDFILT_0)
1428#define LL_ADC_AWD_FILTERING_5SAMPLES (ADC3_TR1_AWDFILT_2 )
1429#define LL_ADC_AWD_FILTERING_6SAMPLES (ADC3_TR1_AWDFILT_2 | ADC3_TR1_AWDFILT_0)
1430#define LL_ADC_AWD_FILTERING_7SAMPLES (ADC3_TR1_AWDFILT_2 | ADC3_TR1_AWDFILT_1 )
1431#define LL_ADC_AWD_FILTERING_8SAMPLES (ADC3_TR1_AWDFILT_2 | ADC3_TR1_AWDFILT_1 | ADC3_TR1_AWDFILT_0)
1441#define LL_ADC_OVS_DISABLE (0x00000000UL)
1442#define LL_ADC_OVS_GRP_REGULAR_CONTINUED ( ADC_CFGR2_ROVSE)
1443#define LL_ADC_OVS_GRP_REGULAR_RESUMED (ADC_CFGR2_ROVSM | ADC_CFGR2_ROVSE)
1444#define LL_ADC_OVS_GRP_INJECTED ( ADC_CFGR2_JOVSE )
1445#define LL_ADC_OVS_GRP_INJ_REG_RESUMED ( ADC_CFGR2_JOVSE | ADC_CFGR2_ROVSE)
1454#define LL_ADC_OVS_REG_CONT (0x00000000UL)
1455#define LL_ADC_OVS_REG_DISCONT (ADC_CFGR2_TROVS)
1459#if defined(ADC_VER_V5_V90)
1464#define LL_ADC_OVS_RATIO_2 (0x00000000UL)
1465#define LL_ADC_OVS_RATIO_4 ( ADC3_CFGR2_OVSR_0)
1466#define LL_ADC_OVS_RATIO_8 ( ADC3_CFGR2_OVSR_1 )
1467#define LL_ADC_OVS_RATIO_16 ( ADC3_CFGR2_OVSR_1 | ADC3_CFGR2_OVSR_0)
1468#define LL_ADC_OVS_RATIO_32 (ADC3_CFGR2_OVSR_2 )
1469#define LL_ADC_OVS_RATIO_64 (ADC3_CFGR2_OVSR_2 | ADC3_CFGR2_OVSR_0)
1470#define LL_ADC_OVS_RATIO_128 (ADC3_CFGR2_OVSR_2 | ADC3_CFGR2_OVSR_1 )
1471#define LL_ADC_OVS_RATIO_256 (ADC3_CFGR2_OVSR_2 | ADC3_CFGR2_OVSR_1 | ADC3_CFGR2_OVSR_0)
1481#define LL_ADC_OVS_SHIFT_NONE (0x00000000UL)
1482#define LL_ADC_OVS_SHIFT_RIGHT_1 ( ADC_CFGR2_OVSS_0)
1483#define LL_ADC_OVS_SHIFT_RIGHT_2 ( ADC_CFGR2_OVSS_1 )
1484#define LL_ADC_OVS_SHIFT_RIGHT_3 ( ADC_CFGR2_OVSS_1 | ADC_CFGR2_OVSS_0)
1485#define LL_ADC_OVS_SHIFT_RIGHT_4 ( ADC_CFGR2_OVSS_2 )
1486#define LL_ADC_OVS_SHIFT_RIGHT_5 ( ADC_CFGR2_OVSS_2 | ADC_CFGR2_OVSS_0)
1487#define LL_ADC_OVS_SHIFT_RIGHT_6 ( ADC_CFGR2_OVSS_2 | ADC_CFGR2_OVSS_1 )
1488#define LL_ADC_OVS_SHIFT_RIGHT_7 ( ADC_CFGR2_OVSS_2 | ADC_CFGR2_OVSS_1 | ADC_CFGR2_OVSS_0)
1489#define LL_ADC_OVS_SHIFT_RIGHT_8 (ADC_CFGR2_OVSS_3 )
1490#define LL_ADC_OVS_SHIFT_RIGHT_9 (ADC_CFGR2_OVSS_3 | ADC_CFGR2_OVSS_0)
1491#define LL_ADC_OVS_SHIFT_RIGHT_10 (ADC_CFGR2_OVSS_3 | ADC_CFGR2_OVSS_1 )
1492#define LL_ADC_OVS_SHIFT_RIGHT_11 (ADC_CFGR2_OVSS_3 | ADC_CFGR2_OVSS_1 | ADC_CFGR2_OVSS_0)
1501#define LL_ADC_MULTI_INDEPENDENT (0x00000000UL)
1502#define LL_ADC_MULTI_DUAL_REG_SIMULT ( ADC_CCR_DUAL_2 | ADC_CCR_DUAL_1 )
1503#define LL_ADC_MULTI_DUAL_REG_INTERL ( ADC_CCR_DUAL_2 | ADC_CCR_DUAL_1 | ADC_CCR_DUAL_0)
1504#define LL_ADC_MULTI_DUAL_INJ_SIMULT ( ADC_CCR_DUAL_2 | ADC_CCR_DUAL_0)
1505#define LL_ADC_MULTI_DUAL_INJ_ALTERN (ADC_CCR_DUAL_3 | ADC_CCR_DUAL_0)
1506#define LL_ADC_MULTI_DUAL_REG_SIM_INJ_SIM ( ADC_CCR_DUAL_0)
1507#define LL_ADC_MULTI_DUAL_REG_SIM_INJ_ALT ( ADC_CCR_DUAL_1 )
1508#define LL_ADC_MULTI_DUAL_REG_INT_INJ_SIM ( ADC_CCR_DUAL_1 | ADC_CCR_DUAL_0)
1517#define LL_ADC_MULTI_REG_DMA_EACH_ADC (0x00000000UL)
1518#define LL_ADC_MULTI_REG_DMA_RES_32_10B (ADC_CCR_DAMDF_1 )
1519#define LL_ADC_MULTI_REG_DMA_RES_8B (ADC_CCR_DAMDF_1 | ADC_CCR_DAMDF_0)
1528#define LL_ADC_MULTI_TWOSMP_DELAY_1CYCLE_5 (0x00000000UL)
1529#define LL_ADC_MULTI_TWOSMP_DELAY_2CYCLES_5 ( ADC_CCR_DELAY_0)
1530#define LL_ADC_MULTI_TWOSMP_DELAY_3CYCLES_5 ( ADC_CCR_DELAY_1 )
1531#define LL_ADC_MULTI_TWOSMP_DELAY_4CYCLES_5 ( ADC_CCR_DELAY_1 | ADC_CCR_DELAY_0)
1532#define LL_ADC_MULTI_TWOSMP_DELAY_4CYCLES_5_8_BITS ( ADC_CCR_DELAY_2 | ADC_CCR_DELAY_1 | ADC_CCR_DELAY_0)
1533#define LL_ADC_MULTI_TWOSMP_DELAY_5CYCLES_5 ( ADC_CCR_DELAY_2 )
1534#define LL_ADC_MULTI_TWOSMP_DELAY_5CYCLES_5_10_BITS ( ADC_CCR_DELAY_2 | ADC_CCR_DELAY_1 | ADC_CCR_DELAY_0)
1535#define LL_ADC_MULTI_TWOSMP_DELAY_6CYCLES (ADC_CCR_DELAY_3 )
1536#define LL_ADC_MULTI_TWOSMP_DELAY_6CYCLES_5 ( ADC_CCR_DELAY_2 | ADC_CCR_DELAY_0)
1537#define LL_ADC_MULTI_TWOSMP_DELAY_6CYCLES_5_12_BITS ( ADC_CCR_DELAY_2 | ADC_CCR_DELAY_1 | ADC_CCR_DELAY_0)
1538#define LL_ADC_MULTI_TWOSMP_DELAY_7CYCLES_5 ( ADC_CCR_DELAY_2 | ADC_CCR_DELAY_1 | ADC_CCR_DELAY_0)
1539#define LL_ADC_MULTI_TWOSMP_DELAY_8CYCLES (ADC_CCR_DELAY_3 )
1540#define LL_ADC_MULTI_TWOSMP_DELAY_9CYCLES (ADC_CCR_DELAY_3 )
1549#define LL_ADC_MULTI_MASTER ( ADC_CDR_RDATA_MST)
1550#define LL_ADC_MULTI_SLAVE (ADC_CDR_RDATA_SLV )
1551#define LL_ADC_MULTI_MASTER_SLAVE (ADC_CDR_RDATA_SLV | ADC_CDR_RDATA_MST)
1589#define LL_ADC_DELAY_INTERNAL_REGUL_STAB_US ( 10UL)
1595#define LL_ADC_DELAY_VREFINT_STAB_US (5UL)
1601#define LL_ADC_DELAY_TEMPSENSOR_STAB_US ( 26UL)
1610#define LL_ADC_DELAY_CALIB_ENABLE_ADC_CYCLES ( 4UL)
1620#define ADC_LINEARITY_BIT_TOGGLE_TIMEOUT (524400UL)
1649#define LL_ADC_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
1657#define LL_ADC_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
1667#if defined(ADC_VER_V5_V90)
1684#define __LL_ADC12_RESOLUTION_TO_ADC3(__ADC_RESOLUTION__) \
1686 ((__ADC_RESOLUTION__) == LL_ADC_RESOLUTION_12B) \
1689 ((__ADC_RESOLUTION__) == LL_ADC_RESOLUTION_10B) \
1692 ((__ADC_RESOLUTION__) == LL_ADC_RESOLUTION_8B) \
1695 ((__ADC_RESOLUTION__) == LL_ADC_RESOLUTION_6B) \
1696 ?((ADC_CFGR_RES_2|ADC_CFGR_RES_1 | ADC_CFGR_RES_0)) \
1744#define __LL_ADC_CHANNEL_TO_DECIMAL_NB(__CHANNEL__) \
1745 ((((__CHANNEL__) & ADC_CHANNEL_ID_BITFIELD_MASK) == 0UL) \
1747 ((__CHANNEL__) & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS \
1751 (uint32_t)POSITION_VAL((__CHANNEL__)) \
1797#define __LL_ADC_DECIMAL_NB_TO_CHANNEL(__DECIMAL_NB__) \
1798 (((__DECIMAL_NB__) <= 9UL) \
1800 ((__DECIMAL_NB__) << ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) | \
1801 (ADC_AWD2CR_AWD2CH_0 << (__DECIMAL_NB__)) | \
1802 (ADC_SMPR1_REGOFFSET | (((3UL * (__DECIMAL_NB__))) << ADC_CHANNEL_SMPx_BITOFFSET_POS)) \
1806 ((__DECIMAL_NB__) << ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) | \
1807 (ADC_AWD2CR_AWD2CH_0 << (__DECIMAL_NB__)) | \
1808 (ADC_SMPR2_REGOFFSET | (((3UL * ((__DECIMAL_NB__) - 10UL))) << ADC_CHANNEL_SMPx_BITOFFSET_POS)) \
1863#define __LL_ADC_IS_CHANNEL_INTERNAL(__CHANNEL__) \
1864 (((__CHANNEL__) & ADC_CHANNEL_ID_INTERNAL_CH_MASK) != 0UL)
1932#define __LL_ADC_CHANNEL_INTERNAL_TO_EXTERNAL(__CHANNEL__) \
1933 ((__CHANNEL__) & ~ADC_CHANNEL_ID_INTERNAL_CH_MASK)
1962#define __LL_ADC_IS_CHANNEL_INTERNAL_AVAILABLE(__ADC_INSTANCE__, __CHANNEL__) \
1963 ((((__ADC_INSTANCE__) == ADC2) \
1965 ((__CHANNEL__) == LL_ADC_CHANNEL_DAC1CH1_ADC2) || \
1966 ((__CHANNEL__) == LL_ADC_CHANNEL_DAC1CH2_ADC2) \
1970 (((__ADC_INSTANCE__) == ADC3) \
1972 ((__CHANNEL__) == LL_ADC_CHANNEL_TEMPSENSOR) || \
1973 ((__CHANNEL__) == LL_ADC_CHANNEL_VBAT) || \
1974 ((__CHANNEL__) == LL_ADC_CHANNEL_VREFINT) \
1979#define __LL_ADC_IS_CHANNEL_INTERNAL_AVAILABLE(__ADC_INSTANCE__, __CHANNEL__) \
1980 ((((__ADC_INSTANCE__) == ADC2) \
1982 ((__CHANNEL__) == LL_ADC_CHANNEL_DAC1CH1_ADC2) || \
1983 ((__CHANNEL__) == LL_ADC_CHANNEL_DAC1CH2_ADC2) || \
1984 ((__CHANNEL__) == LL_ADC_CHANNEL_TEMPSENSOR) || \
1985 ((__CHANNEL__) == LL_ADC_CHANNEL_VBAT) || \
1986 ((__CHANNEL__) == LL_ADC_CHANNEL_VREFINT) \
2124#define __LL_ADC_ANALOGWD_CHANNEL_GROUP(__CHANNEL__, __GROUP__) \
2125 (((__GROUP__) == LL_ADC_GROUP_REGULAR) \
2126 ? (((__CHANNEL__) & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL) \
2128 ((__GROUP__) == LL_ADC_GROUP_INJECTED) \
2129 ? (((__CHANNEL__) & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL) \
2131 (((__CHANNEL__) & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL) \
2154#define __LL_ADC_ANALOGWD_SET_THRESHOLD_RESOLUTION(__ADC_RESOLUTION__, __AWD_THRESHOLD__) \
2155 ((__AWD_THRESHOLD__) << ((__ADC_RESOLUTION__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1U )))
2177#define __LL_ADC_ANALOGWD_GET_THRESHOLD_RESOLUTION(__ADC_RESOLUTION__, __AWD_THRESHOLD_16_BITS__) \
2178 ((__AWD_THRESHOLD_16_BITS__) >> ((__ADC_RESOLUTION__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1U )))
2193#define __LL_ADC_CALIB_FACTOR_SINGLE_DIFF(__CALIB_FACTOR_SINGLE_ENDED__, __CALIB_FACTOR_DIFFERENTIAL__) \
2194 (((__CALIB_FACTOR_DIFFERENTIAL__) << ADC_CALFACT_CALFACT_D_Pos) | (__CALIB_FACTOR_SINGLE_ENDED__))
2209#define __LL_ADC_MULTI_CONV_DATA_MASTER_SLAVE(__ADC_MULTI_MASTER_SLAVE__, __ADC_MULTI_CONV_DATA__) \
2210 (((__ADC_MULTI_CONV_DATA__) >> ((ADC_CDR_RDATA_SLV_Pos) & ~(__ADC_MULTI_MASTER_SLAVE__))) & ADC_CDR_RDATA_MST)
2224#define __LL_ADC_MULTI_INSTANCE_MASTER(__ADCx__) \
2225 ( ( ((__ADCx__) == ADC2) \
2242#if defined(ADC3_COMMON)
2243#define __LL_ADC_COMMON_INSTANCE(__ADCx__) \
2244 ((((__ADCx__) == ADC1) || ((__ADCx__) == ADC2)) \
2254#define __LL_ADC_COMMON_INSTANCE(__ADCx__) (ADC12_COMMON)
2274#if defined(ADC3_COMMON)
2275#define __LL_ADC_IS_ENABLED_ALL_COMMON_INSTANCE(__ADCXY_COMMON__) \
2276 (((__ADCXY_COMMON__) == ADC12_COMMON) \
2278 (LL_ADC_IsEnabled(ADC1) | \
2279 LL_ADC_IsEnabled(ADC2) ) \
2283 (LL_ADC_IsEnabled(ADC3)) \
2287#define __LL_ADC_IS_ENABLED_ALL_COMMON_INSTANCE(__ADCXY_COMMON__) \
2288 (LL_ADC_IsEnabled(ADC1) | LL_ADC_IsEnabled(ADC2))
2305#define __LL_ADC_DIGITAL_SCALE(__ADC_RESOLUTION__) \
2306 (0xFFFFUL >> ((__ADC_RESOLUTION__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)))
2308#if defined(ADC_VER_V5_V90)
2322#define __LL_ADC3_DIGITAL_SCALE(__ADC_RESOLUTION__) \
2323 (0xFFFUL >> ((__ADC_RESOLUTION__) >> (ADC_CFGR_RES_BITOFFSET_POS_ADC3 - 1UL)))
2345#if defined(ADC_VER_V5_X) || defined(ADC_VER_V5_V90)
2346#define __LL_ADC_CONVERT_DATA_RESOLUTION(__DATA__,\
2347 __ADC_RESOLUTION_CURRENT__,\
2348 __ADC_RESOLUTION_TARGET__) \
2349( (__ADC_RESOLUTION_CURRENT__ == LL_ADC_RESOLUTION_8B) \
2352 << (((__ADC_RESOLUTION_CURRENT__) & ~(ADC_CFGR_RES_1 | ADC_CFGR_RES_0) ) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \
2353 >> ((__ADC_RESOLUTION_TARGET__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \
2357 (__ADC_RESOLUTION_TARGET__ == LL_ADC_RESOLUTION_8B) \
2360 << ((__ADC_RESOLUTION_CURRENT__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \
2361 >> (((__ADC_RESOLUTION_TARGET__) & ~(ADC_CFGR_RES_1 | ADC_CFGR_RES_0) ) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \
2366 << ((__ADC_RESOLUTION_CURRENT__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \
2367 >> ((__ADC_RESOLUTION_TARGET__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \
2374#define __LL_ADC_CONVERT_DATA_RESOLUTION(__DATA__,\
2375 __ADC_RESOLUTION_CURRENT__,\
2376 __ADC_RESOLUTION_TARGET__) \
2377( (__ADC_RESOLUTION_CURRENT__ == LL_ADC_RESOLUTION_8B) \
2380 << (((__ADC_RESOLUTION_CURRENT__) & ~(ADC_CFGR_RES_1 | ADC_CFGR_RES_0) ) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \
2381 >> ((__ADC_RESOLUTION_TARGET__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \
2385 (__ADC_RESOLUTION_TARGET__ == LL_ADC_RESOLUTION_8B) \
2388 << ((__ADC_RESOLUTION_CURRENT__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \
2389 >> (((__ADC_RESOLUTION_TARGET__) & ~(ADC_CFGR_RES_1 | ADC_CFGR_RES_0) ) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \
2394 << ((__ADC_RESOLUTION_CURRENT__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \
2395 >> ((__ADC_RESOLUTION_TARGET__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \
2402#if defined(ADC_VER_V5_V90)
2421#define __LL_ADC_CONVERT_DATA_RESOLUTION_ADC3(__DATA__,\
2422 __ADC_RESOLUTION_CURRENT__,\
2423 __ADC_RESOLUTION_TARGET__) \
2425 << ((__ADC_RESOLUTION_CURRENT__) >> (ADC_CFGR_RES_BITOFFSET_POS_ADC3 - 1UL))) \
2426 >> ((__ADC_RESOLUTION_TARGET__) >> (ADC_CFGR_RES_BITOFFSET_POS_ADC3 - 1UL)) \
2446#define __LL_ADC_CALC_DATA_TO_VOLTAGE(__VREFANALOG_VOLTAGE__,\
2448 __ADC_RESOLUTION__) \
2449 ((__ADC_DATA__) * (__VREFANALOG_VOLTAGE__) \
2450 / __LL_ADC_DIGITAL_SCALE(__ADC_RESOLUTION__) \
2479#define __LL_ADC_CALC_VREFANALOG_VOLTAGE(__VREFINT_ADC_DATA__,\
2480 __ADC_RESOLUTION__) \
2481 (((uint32_t)(*VREFINT_CAL_ADDR) * VREFINT_CAL_VREF) \
2482 / __LL_ADC_CONVERT_DATA_RESOLUTION((__VREFINT_ADC_DATA__), \
2483 (__ADC_RESOLUTION__), \
2484 LL_ADC_RESOLUTION_16B) \
2533#define __LL_ADC_CALC_TEMPERATURE(__VREFANALOG_VOLTAGE__,\
2534 __TEMPSENSOR_ADC_DATA__,\
2535 __ADC_RESOLUTION__) \
2536 (((( ((int32_t)((__LL_ADC_CONVERT_DATA_RESOLUTION((__TEMPSENSOR_ADC_DATA__), \
2537 (__ADC_RESOLUTION__), \
2538 LL_ADC_RESOLUTION_16B) \
2539 * (__VREFANALOG_VOLTAGE__)) \
2540 / TEMPSENSOR_CAL_VREFANALOG) \
2541 - (int32_t) *TEMPSENSOR_CAL1_ADDR) \
2542 ) * (int32_t)(TEMPSENSOR_CAL2_TEMP - TEMPSENSOR_CAL1_TEMP) \
2543 ) / (int32_t)((int32_t)*TEMPSENSOR_CAL2_ADDR - (int32_t)*TEMPSENSOR_CAL1_ADDR) \
2544 ) + TEMPSENSOR_CAL1_TEMP \
2592#define __LL_ADC_CALC_TEMPERATURE_TYP_PARAMS(__TEMPSENSOR_TYP_AVGSLOPE__,\
2593 __TEMPSENSOR_TYP_CALX_V__,\
2594 __TEMPSENSOR_CALX_TEMP__,\
2595 __VREFANALOG_VOLTAGE__,\
2596 __TEMPSENSOR_ADC_DATA__,\
2597 __ADC_RESOLUTION__) \
2599 (int32_t)((((__TEMPSENSOR_ADC_DATA__) * (__VREFANALOG_VOLTAGE__)) \
2600 / __LL_ADC_DIGITAL_SCALE(__ADC_RESOLUTION__)) \
2603 (int32_t)(((__TEMPSENSOR_TYP_CALX_V__)) \
2606 ) / (int32_t)(__TEMPSENSOR_TYP_AVGSLOPE__) \
2607 ) + (int32_t)(__TEMPSENSOR_CALX_TEMP__) \
2660__STATIC_INLINE uint32_t LL_ADC_DMA_GetRegAddr(
ADC_TypeDef *ADCx, uint32_t Register)
2662 uint32_t data_reg_addr;
2664 if (Register == LL_ADC_DMA_REG_REGULAR_DATA)
2667 data_reg_addr = (uint32_t) & (ADCx->
DR);
2672 data_reg_addr = (uint32_t) & ((__LL_ADC_COMMON_INSTANCE(ADCx))->CDR);
2675 return data_reg_addr;
2721__STATIC_INLINE
void LL_ADC_SetCommonClock(
ADC_Common_TypeDef *ADCxy_COMMON, uint32_t CommonClock)
2789__STATIC_INLINE
void LL_ADC_SetCommonPathInternalCh(
ADC_Common_TypeDef *ADCxy_COMMON, uint32_t PathInternal)
2811__STATIC_INLINE uint32_t LL_ADC_GetCommonPathInternalCh(
ADC_Common_TypeDef *ADCxy_COMMON)
2846__STATIC_INLINE
void LL_ADC_SetCommonPathInternalChAdd(
ADC_Common_TypeDef *ADCxy_COMMON, uint32_t PathInternal)
2848 SET_BIT(ADCxy_COMMON->
CCR, PathInternal);
2870__STATIC_INLINE
void LL_ADC_SetCommonPathInternalChRem(
ADC_Common_TypeDef *ADCxy_COMMON, uint32_t PathInternal)
2872 CLEAR_BIT(ADCxy_COMMON->
CCR, PathInternal);
2918__STATIC_INLINE
void LL_ADC_SetCalibrationOffsetFactor(
ADC_TypeDef *ADCx, uint32_t SingleDiff, uint32_t CalibrationFactor)
2920#if defined(ADC_VER_V5_V90)
2922 SingleDiff & ADC_SINGLEDIFF_CALIB_FACTOR_MASK,
2923 CalibrationFactor << (((SingleDiff & ADC_SINGLEDIFF_CALIB_F_BIT_D_MASK) >> ADC_SINGLEDIFF_CALIB_F_BIT_D_SHIFT4) & ~(SingleDiff &
ADC_CALFACT_CALFACT_S)));
2926 SingleDiff & ADC_SINGLEDIFF_CALIB_FACTOR_MASK,
2927 CalibrationFactor << (((SingleDiff & ADC_SINGLEDIFF_CALIB_F_BIT_D_MASK) >> ADC_SINGLEDIFF_CALIB_F_BIT_D_SHIFT4) & ~(SingleDiff &
ADC_CALFACT_CALFACT_S)));
2949__STATIC_INLINE uint32_t LL_ADC_GetCalibrationOffsetFactor(
ADC_TypeDef *ADCx, uint32_t SingleDiff)
2955#if defined(ADC_VER_V5_V90)
2956 return (uint32_t)(READ_BIT(ADCx->
CALFACT_RES13, (SingleDiff & ADC_SINGLEDIFF_CALIB_FACTOR_MASK)) >> ((SingleDiff & ADC_SINGLEDIFF_CALIB_F_BIT_D_MASK) >> ADC_SINGLEDIFF_CALIB_F_BIT_D_SHIFT4));
2958 return (uint32_t)(READ_BIT(ADCx->
CALFACT, (SingleDiff & ADC_SINGLEDIFF_CALIB_FACTOR_MASK)) >> ((SingleDiff & ADC_SINGLEDIFF_CALIB_F_BIT_D_MASK) >> ADC_SINGLEDIFF_CALIB_F_BIT_D_SHIFT4));
2984__STATIC_INLINE
void LL_ADC_SetCalibrationLinearFactor(
ADC_TypeDef *ADCx, uint32_t LinearityWord, uint32_t CalibrationFactor)
2986#if defined(ADC_VER_V5_V90)
2989 uint32_t timeout_cpu_cycles = ADC_LINEARITY_BIT_TOGGLE_TIMEOUT;
2992 while ((READ_BIT(ADCx->
CR, LinearityWord) == 0UL) && (timeout_cpu_cycles > 0UL))
2994 timeout_cpu_cycles--;
2998 uint32_t timeout_cpu_cycles = ADC_LINEARITY_BIT_TOGGLE_TIMEOUT;
3001 while ((READ_BIT(ADCx->
CR, LinearityWord) == 0UL) && (timeout_cpu_cycles > 0UL))
3003 timeout_cpu_cycles--;
3024__STATIC_INLINE uint32_t LL_ADC_GetCalibrationLinearFactor(
ADC_TypeDef *ADCx, uint32_t LinearityWord)
3026 uint32_t timeout_cpu_cycles = ADC_LINEARITY_BIT_TOGGLE_TIMEOUT;
3027 CLEAR_BIT(ADCx->
CR, LinearityWord);
3028 while ((READ_BIT(ADCx->
CR, LinearityWord) != 0UL) && (timeout_cpu_cycles > 0UL))
3030 timeout_cpu_cycles--;
3032#if defined(ADC_VER_V5_V90)
3056__STATIC_INLINE
void LL_ADC_SetResolution(
ADC_TypeDef *ADCx, uint32_t Resolution)
3058#if defined(ADC_VER_V5_3)
3062#elif defined(ADC_VER_V5_V90)
3069 if ((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL)
3075 if (LL_ADC_RESOLUTION_8B == Resolution)
3086 if ((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL)
3092 if (LL_ADC_RESOLUTION_8B == Resolution)
3121__STATIC_INLINE uint32_t LL_ADC_GetResolution(
ADC_TypeDef *ADCx)
3123#if defined (ADC_VER_V5_3)
3127#elif defined(ADC_VER_V5_V90)
3136 return (LL_ADC_RESOLUTION_8B);
3145 if ((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL)
3153 return (LL_ADC_RESOLUTION_8B);
3215__STATIC_INLINE
void LL_ADC_SetLowPowerMode(
ADC_TypeDef *ADCx, uint32_t LowPowerMode)
3266__STATIC_INLINE uint32_t LL_ADC_GetLowPowerMode(
ADC_TypeDef *ADCx)
3302__STATIC_INLINE
void LL_ADC_SetChannelPreselection(
ADC_TypeDef *ADCx, uint32_t Channel)
3304#if defined(ADC_VER_V5_V90)
3308 ADCx->
PCSEL_RES0 |= (1UL << (__LL_ADC_CHANNEL_TO_DECIMAL_NB(Channel) & 0x1FUL));
3312 ADCx->
PCSEL |= (1UL << (__LL_ADC_CHANNEL_TO_DECIMAL_NB(Channel) & 0x1FUL));
3347__STATIC_INLINE uint32_t LL_ADC_GetChannelPreselection(
ADC_TypeDef *ADCx, uint32_t Channel)
3349#if defined(ADC_VER_V5_V90)
3353 return (uint32_t)(READ_BIT(ADCx->
PCSEL_RES0, 1UL << (__LL_ADC_CHANNEL_TO_DECIMAL_NB(Channel) & 0x1FUL)));
3361 return (uint32_t)(READ_BIT(ADCx->
PCSEL, 1UL << (__LL_ADC_CHANNEL_TO_DECIMAL_NB(Channel) & 0x1FUL)));
3438__STATIC_INLINE
void LL_ADC_SetOffset(
ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t Channel, uint32_t OffsetLevel)
3440 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3441#if defined(ADC_VER_V5_V90)
3453 (Channel & ADC_CHANNEL_ID_NUMBER_MASK) | OffsetLevel);
3520__STATIC_INLINE uint32_t LL_ADC_GetOffsetChannel(
ADC_TypeDef *ADCx, uint32_t Offsety)
3522 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3546__STATIC_INLINE uint32_t LL_ADC_GetOffsetLevel(
ADC_TypeDef *ADCx, uint32_t Offsety)
3548 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3569__STATIC_INLINE
void LL_ADC_SetDataRightShift(
ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t RigthShift)
3588__STATIC_INLINE uint32_t LL_ADC_GetDataRightShift(
ADC_TypeDef *ADCx, uint32_t Offsety)
3590 return (uint32_t)((READ_BIT(ADCx->
CFGR2, (
ADC_CFGR2_RSHIFT1 << (Offsety & 0x1FUL)))) >> (Offsety & 0x1FUL));
3611__STATIC_INLINE
void LL_ADC_SetOffsetSignedSaturation(
ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t OffsetSignedSaturation)
3613#if defined(ADC_VER_V5_V90)
3621 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3643__STATIC_INLINE uint32_t LL_ADC_GetOffsetSignedSaturation(
ADC_TypeDef *ADCx, uint32_t Offsety)
3645#if defined(ADC_VER_V5_V90)
3654 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3659#if defined(ADC_VER_V5_V90)
3682__STATIC_INLINE
void LL_ADC_SetOffsetSaturation(
ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t OffsetSaturation)
3686 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3711__STATIC_INLINE uint32_t LL_ADC_GetOffsetSaturation(
ADC_TypeDef *ADCx, uint32_t Offsety)
3715 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3746__STATIC_INLINE
void LL_ADC_SetOffsetSign(
ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t OffsetSign)
3750 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3775__STATIC_INLINE uint32_t LL_ADC_GetOffsetSign(
ADC_TypeDef *ADCx, uint32_t Offsety)
3779 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3815__STATIC_INLINE
void LL_ADC_SetOffsetState(
ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t OffsetState)
3817 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3849__STATIC_INLINE uint32_t LL_ADC_GetOffsetState(
ADC_TypeDef *ADCx, uint32_t Offsety)
3851 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3917__STATIC_INLINE
void LL_ADC_REG_SetTriggerSource(
ADC_TypeDef *ADCx, uint32_t TriggerSource)
3961__STATIC_INLINE uint32_t LL_ADC_REG_GetTriggerSource(
ADC_TypeDef *ADCx)
3967 uint32_t ShiftExten = ((TriggerSource &
ADC_CFGR_EXTEN) >> (ADC_REG_TRIG_EXTEN_BITOFFSET_POS - 2UL));
3971 return ((TriggerSource
3988__STATIC_INLINE uint32_t LL_ADC_REG_IsTriggerSourceSWStart(
ADC_TypeDef *ADCx)
4008__STATIC_INLINE
void LL_ADC_REG_SetTriggerEdge(
ADC_TypeDef *ADCx, uint32_t ExternalTriggerEdge)
4023__STATIC_INLINE uint32_t LL_ADC_REG_GetTriggerEdge(
ADC_TypeDef *ADCx)
4028#if defined(ADC_VER_V5_V90)
4047__STATIC_INLINE
void LL_ADC_REG_SetSamplingMode(
ADC_TypeDef *ADCx, uint32_t SamplingMode)
4114__STATIC_INLINE
void LL_ADC_REG_SetSequencerLength(
ADC_TypeDef *ADCx, uint32_t SequencerNbRanks)
4168__STATIC_INLINE uint32_t LL_ADC_REG_GetSequencerLength(
ADC_TypeDef *ADCx)
4200__STATIC_INLINE
void LL_ADC_REG_SetSequencerDiscont(
ADC_TypeDef *ADCx, uint32_t SeqDiscont)
4223__STATIC_INLINE uint32_t LL_ADC_REG_GetSequencerDiscont(
ADC_TypeDef *ADCx)
4315__STATIC_INLINE
void LL_ADC_REG_SetSequencerRanks(
ADC_TypeDef *ADCx, uint32_t Rank, uint32_t Channel)
4321 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
SQR1, ((Rank & ADC_REG_SQRX_REGOFFSET_MASK) >> ADC_SQRX_REGOFFSET_POS));
4324 ADC_CHANNEL_ID_NUMBER_MASK_POSBIT0 << (Rank & ADC_REG_RANK_ID_SQRX_MASK),
4325 ((Channel & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (Rank & ADC_REG_RANK_ID_SQRX_MASK));
4417__STATIC_INLINE uint32_t LL_ADC_REG_GetSequencerRanks(
ADC_TypeDef *ADCx, uint32_t Rank)
4419 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
SQR1, ((Rank & ADC_REG_SQRX_REGOFFSET_MASK) >> ADC_SQRX_REGOFFSET_POS));
4421 return (uint32_t)((READ_BIT(*preg,
4422 ADC_CHANNEL_ID_NUMBER_MASK_POSBIT0 << (Rank & ADC_REG_RANK_ID_SQRX_MASK))
4423 >> (Rank & ADC_REG_RANK_ID_SQRX_MASK)) << ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS
4446__STATIC_INLINE
void LL_ADC_REG_SetContinuousMode(
ADC_TypeDef *ADCx, uint32_t Continuous)
4463__STATIC_INLINE uint32_t LL_ADC_REG_GetContinuousMode(
ADC_TypeDef *ADCx)
4479__STATIC_INLINE
void LL_ADC_REG_SetDataTransferMode(
ADC_TypeDef *ADCx, uint32_t DataTransferMode)
4484#if defined(ADC_VER_V5_V90)
4491__STATIC_INLINE
void LL_ADC_EnableDMAReq (
ADC_TypeDef *ADCx)
4496__STATIC_INLINE
void LL_ADC_DisableDMAReq(
ADC_TypeDef *ADCx)
4501__STATIC_INLINE uint32_t LL_ADC_IsEnabledDMAReq (
ADC_TypeDef *ADCx)
4540__STATIC_INLINE
void LL_ADC_REG_SetDMATransferMode(
ADC_TypeDef *ADCx, uint32_t DMATransfer)
4578__STATIC_INLINE uint32_t LL_ADC_REG_GetDMATransferMode(
ADC_TypeDef *ADCx)
4607__STATIC_INLINE uint32_t LL_ADC_REG_GetDataTransferMode(
ADC_TypeDef *ADCx)
4633__STATIC_INLINE
void LL_ADC_REG_SetOverrun(
ADC_TypeDef *ADCx, uint32_t Overrun)
4647__STATIC_INLINE uint32_t LL_ADC_REG_GetOverrun(
ADC_TypeDef *ADCx)
4705__STATIC_INLINE
void LL_ADC_INJ_SetTriggerSource(
ADC_TypeDef *ADCx, uint32_t TriggerSource)
4749__STATIC_INLINE uint32_t LL_ADC_INJ_GetTriggerSource(
ADC_TypeDef *ADCx)
4755 uint32_t ShiftJexten = ((TriggerSource &
ADC_JSQR_JEXTEN) >> (ADC_INJ_TRIG_EXTEN_BITOFFSET_POS - 2UL));
4759 return ((TriggerSource
4776__STATIC_INLINE uint32_t LL_ADC_INJ_IsTriggerSourceSWStart(
ADC_TypeDef *ADCx)
4796__STATIC_INLINE
void LL_ADC_INJ_SetTriggerEdge(
ADC_TypeDef *ADCx, uint32_t ExternalTriggerEdge)
4811__STATIC_INLINE uint32_t LL_ADC_INJ_GetTriggerEdge(
ADC_TypeDef *ADCx)
4837__STATIC_INLINE
void LL_ADC_INJ_SetSequencerLength(
ADC_TypeDef *ADCx, uint32_t SequencerNbRanks)
4858__STATIC_INLINE uint32_t LL_ADC_INJ_GetSequencerLength(
ADC_TypeDef *ADCx)
4876__STATIC_INLINE
void LL_ADC_INJ_SetSequencerDiscont(
ADC_TypeDef *ADCx, uint32_t SeqDiscont)
4891__STATIC_INLINE uint32_t LL_ADC_INJ_GetSequencerDiscont(
ADC_TypeDef *ADCx)
4954__STATIC_INLINE
void LL_ADC_INJ_SetSequencerRanks(
ADC_TypeDef *ADCx, uint32_t Rank, uint32_t Channel)
4960 MODIFY_REG(ADCx->
JSQR,
4961 (ADC_CHANNEL_ID_NUMBER_MASK >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (Rank & ADC_INJ_RANK_ID_JSQR_MASK),
4962 ((Channel & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (Rank & ADC_INJ_RANK_ID_JSQR_MASK));
5026__STATIC_INLINE uint32_t LL_ADC_INJ_GetSequencerRanks(
ADC_TypeDef *ADCx, uint32_t Rank)
5028 return (uint32_t)((READ_BIT(ADCx->
JSQR,
5029 (ADC_CHANNEL_ID_NUMBER_MASK >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (Rank & ADC_INJ_RANK_ID_JSQR_MASK))
5030 >> (Rank & ADC_INJ_RANK_ID_JSQR_MASK)) << ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS
5064__STATIC_INLINE
void LL_ADC_INJ_SetTrigAuto(
ADC_TypeDef *ADCx, uint32_t TrigAuto)
5078__STATIC_INLINE uint32_t LL_ADC_INJ_GetTrigAuto(
ADC_TypeDef *ADCx)
5124__STATIC_INLINE
void LL_ADC_INJ_SetQueueMode(
ADC_TypeDef *ADCx, uint32_t QueueMode)
5139__STATIC_INLINE uint32_t LL_ADC_INJ_GetQueueMode(
ADC_TypeDef *ADCx)
5340__STATIC_INLINE
void LL_ADC_INJ_ConfigQueueContext(
ADC_TypeDef *ADCx,
5341 uint32_t TriggerSource,
5342 uint32_t ExternalTriggerEdge,
5343 uint32_t SequencerNbRanks,
5344 uint32_t Rank1_Channel,
5345 uint32_t Rank2_Channel,
5346 uint32_t Rank3_Channel,
5347 uint32_t Rank4_Channel)
5355 uint32_t is_trigger_not_sw = (uint32_t)((TriggerSource != LL_ADC_INJ_TRIG_SOFTWARE) ? 1UL : 0UL);
5356 MODIFY_REG(ADCx->
JSQR,
5365 (ExternalTriggerEdge * (is_trigger_not_sw)) |
5366 (((Rank4_Channel & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (LL_ADC_INJ_RANK_4 & ADC_INJ_RANK_ID_JSQR_MASK)) |
5367 (((Rank3_Channel & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (LL_ADC_INJ_RANK_3 & ADC_INJ_RANK_ID_JSQR_MASK)) |
5368 (((Rank2_Channel & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (LL_ADC_INJ_RANK_2 & ADC_INJ_RANK_ID_JSQR_MASK)) |
5369 (((Rank1_Channel & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (LL_ADC_INJ_RANK_1 & ADC_INJ_RANK_ID_JSQR_MASK)) |
5471__STATIC_INLINE
void LL_ADC_SetChannelSamplingTime(
ADC_TypeDef *ADCx, uint32_t Channel, uint32_t SamplingTime)
5477 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
SMPR1, ((Channel & ADC_CHANNEL_SMPRX_REGOFFSET_MASK) >> ADC_SMPRX_REGOFFSET_POS));
5480 ADC_SMPR1_SMP0 << ((Channel & ADC_CHANNEL_SMPx_BITOFFSET_MASK) >> ADC_CHANNEL_SMPx_BITOFFSET_POS),
5481 SamplingTime << ((Channel & ADC_CHANNEL_SMPx_BITOFFSET_MASK) >> ADC_CHANNEL_SMPx_BITOFFSET_POS));
5556__STATIC_INLINE uint32_t LL_ADC_GetChannelSamplingTime(
ADC_TypeDef *ADCx, uint32_t Channel)
5558 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
SMPR1, ((Channel & ADC_CHANNEL_SMPRX_REGOFFSET_MASK) >> ADC_SMPRX_REGOFFSET_POS));
5560 return (uint32_t)(READ_BIT(*preg,
5561 ADC_SMPR1_SMP0 << ((Channel & ADC_CHANNEL_SMPx_BITOFFSET_MASK) >> ADC_CHANNEL_SMPx_BITOFFSET_POS))
5562 >> ((Channel & ADC_CHANNEL_SMPx_BITOFFSET_MASK) >> ADC_CHANNEL_SMPx_BITOFFSET_POS)
5617__STATIC_INLINE
void LL_ADC_SetChannelSingleDiff(
ADC_TypeDef *ADCx, uint32_t Channel, uint32_t SingleDiff)
5619#if defined(ADC_VER_V5_V90)
5626 Channel & ADC_SINGLEDIFF_CHANNEL_MASK,
5627 (Channel & ADC_SINGLEDIFF_CHANNEL_MASK) & (
ADC_DIFSEL_DIFSEL >> (SingleDiff & ADC_SINGLEDIFF_CHANNEL_SHIFT_MASK)));
5632 Channel & ADC_SINGLEDIFF_CHANNEL_MASK,
5633 (Channel & ADC_SINGLEDIFF_CHANNEL_MASK) & (
ADC_DIFSEL_DIFSEL >> (SingleDiff & ADC_SINGLEDIFF_CHANNEL_SHIFT_MASK)));
5640 Channel & ADC_SINGLEDIFF_CHANNEL_MASK,
5641 (Channel & ADC_SINGLEDIFF_CHANNEL_MASK) & (
ADC_DIFSEL_DIFSEL >> (SingleDiff & ADC_SINGLEDIFF_CHANNEL_SHIFT_MASK)));
5688__STATIC_INLINE uint32_t LL_ADC_GetChannelSingleDiff(
ADC_TypeDef *ADCx, uint32_t Channel)
5690#if defined(ADC_VER_V5_V90)
5691 return (uint32_t)(READ_BIT(ADCx->
DIFSEL_RES12, (Channel & ADC_SINGLEDIFF_CHANNEL_MASK)));
5693 return (uint32_t)(READ_BIT(ADCx->
DIFSEL, (Channel & ADC_SINGLEDIFF_CHANNEL_MASK)));
5837__STATIC_INLINE
void LL_ADC_SetAnalogWDMonitChannels(
ADC_TypeDef *ADCx, uint32_t AWDy, uint32_t AWDChannelGroup)
5843 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
CFGR, ((AWDy & ADC_AWD_CRX_REGOFFSET_MASK) >> ADC_AWD_CRX_REGOFFSET_POS)
5844 + ((AWDy & ADC_AWD_CR12_REGOFFSETGAP_MASK) * ADC_AWD_CR12_REGOFFSETGAP_VAL));
5847 (AWDy & ADC_AWD_CR_ALL_CHANNEL_MASK),
5848 AWDChannelGroup & AWDy);
5976__STATIC_INLINE uint32_t LL_ADC_GetAnalogWDMonitChannels(
ADC_TypeDef *ADCx, uint32_t AWDy)
5978 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
CFGR, ((AWDy & ADC_AWD_CRX_REGOFFSET_MASK) >> ADC_AWD_CRX_REGOFFSET_POS)
5979 + ((AWDy & ADC_AWD_CR12_REGOFFSETGAP_MASK) * ADC_AWD_CR12_REGOFFSETGAP_VAL));
5981 uint32_t AnalogWDMonitChannels = (READ_BIT(*preg, AWDy) & AWDy & ADC_AWD_CR_ALL_CHANNEL_MASK);
5987 if (AnalogWDMonitChannels != 0UL)
5989 if (AWDy == LL_ADC_AWD1)
5994 AnalogWDMonitChannels = ((AnalogWDMonitChannels
5995 | (ADC_AWD_CR23_CHANNEL_MASK)
6003 AnalogWDMonitChannels = (AnalogWDMonitChannels
6010 if ((AnalogWDMonitChannels & ADC_AWD_CR23_CHANNEL_MASK) == ADC_AWD_CR23_CHANNEL_MASK)
6013 AnalogWDMonitChannels = (ADC_AWD_CR23_CHANNEL_MASK
6021 AnalogWDMonitChannels = (AnalogWDMonitChannels
6023 | (__LL_ADC_CHANNEL_TO_DECIMAL_NB(AnalogWDMonitChannels) << ADC_CFGR_AWD1CH_Pos)
6029 return AnalogWDMonitChannels;
6085__STATIC_INLINE
void LL_ADC_SetAnalogWDThresholds(
ADC_TypeDef *ADCx, uint32_t AWDy, uint32_t AWDThresholdsHighLow, uint32_t AWDThresholdValue)
6087#if defined(ADC_VER_V5_V90)
6095 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
LTR1_TR1, ((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS));
6098 AWDThresholdsHighLow,
6099 AWDThresholdValue << ((AWDThresholdsHighLow & ADC_AWD_TRX_BIT_HIGH_MASK) >> ADC_AWD_TRX_BIT_HIGH_SHIFT4));
6108 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
LTR1_TR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL)
6109 + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL)
6110 + (AWDThresholdsHighLow));
6112 MODIFY_REG(*preg,
ADC_LTR_LT, AWDThresholdValue);
6120 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
LTR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL)
6121 + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL)
6122 + (AWDThresholdsHighLow));
6124 MODIFY_REG(*preg,
ADC_LTR_LT, AWDThresholdValue);
6151__STATIC_INLINE uint32_t LL_ADC_GetAnalogWDThresholds(
ADC_TypeDef *ADCx, uint32_t AWDy, uint32_t AWDThresholdsHighLow)
6153#if defined(ADC_VER_V5_V90)
6154 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
LTR1_TR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL)
6155 + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL)
6156 + (AWDThresholdsHighLow));
6158 return (uint32_t)(READ_BIT(*preg,
ADC_LTR_LT));
6160 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
LTR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL)
6161 + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL)
6162 + (AWDThresholdsHighLow));
6164 return (uint32_t)(READ_BIT(*preg,
ADC_LTR_LT));
6168#if defined(ADC_VER_V5_V90)
6214__STATIC_INLINE
void LL_ADC_ConfigAnalogWDThresholds(
ADC_TypeDef *ADCx, uint32_t AWDy, uint32_t AWDThresholdHighValue, uint32_t AWDThresholdLowValue)
6223 uint32_t
__IO *preg = __ADC_PTR_REG_OFFSET(ADCx->
LTR1_TR1, ((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS));
6227 (AWDThresholdHighValue << ADC3_TR1_HT1_Pos) | AWDThresholdLowValue);
6231 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
LTR1_TR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL)
6232 + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL)
6233 + (LL_ADC_AWD_THRESHOLD_LOW));
6234 __IO uint32_t *preg2 = __ADC_PTR_REG_OFFSET(ADCx->
LTR1_TR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL)
6235 + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL)
6236 + (LL_ADC_AWD_THRESHOLD_HIGH));
6238 MODIFY_REG(*preg,
ADC_LTR_LT, AWDThresholdLowValue);
6239 MODIFY_REG(*preg2,
ADC_HTR_HT, AWDThresholdHighValue);
6268__STATIC_INLINE
void LL_ADC_SetAWDFilteringConfiguration(
ADC_TypeDef *ADCx, uint32_t AWDy, uint32_t FilteringConfig)
6297__STATIC_INLINE uint32_t LL_ADC_GetAWDFilteringConfiguration(
ADC_TypeDef *ADCx, uint32_t AWDy)
6346__STATIC_INLINE
void LL_ADC_SetOverSamplingScope(
ADC_TypeDef *ADCx, uint32_t OvsScope)
6371__STATIC_INLINE uint32_t LL_ADC_GetOverSamplingScope(
ADC_TypeDef *ADCx)
6398__STATIC_INLINE
void LL_ADC_SetOverSamplingDiscont(
ADC_TypeDef *ADCx, uint32_t OverSamplingDiscont)
6417__STATIC_INLINE uint32_t LL_ADC_GetOverSamplingDiscont(
ADC_TypeDef *ADCx)
6460__STATIC_INLINE
void LL_ADC_ConfigOverSamplingRatioShift(
ADC_TypeDef *ADCx, uint32_t Ratio, uint32_t Shift)
6462#if defined(ADC_VER_V5_V90)
6494__STATIC_INLINE uint32_t LL_ADC_GetOverSamplingRatio(
ADC_TypeDef *ADCx)
6496#if defined(ADC_VER_V5_V90)
6503 return (((uint32_t)(READ_BIT(ADCx->
CFGR2,
ADC_CFGR2_OVSR)) + (1UL << ADC_CFGR2_OVSR_Pos)) >> ADC_CFGR2_OVSR_Pos);
6507 return (((uint32_t)(READ_BIT(ADCx->
CFGR2,
ADC_CFGR2_OVSR)) + (1UL << ADC_CFGR2_OVSR_Pos)) >> ADC_CFGR2_OVSR_Pos);
6531__STATIC_INLINE uint32_t LL_ADC_GetOverSamplingShift(
ADC_TypeDef *ADCx)
6560__STATIC_INLINE
void LL_ADC_SetBoostMode(
ADC_TypeDef *ADCx, uint32_t BoostMode)
6562#if defined(ADC_VER_V5_V90)
6568 if ((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL)
6590__STATIC_INLINE uint32_t LL_ADC_GetBoostMode(
ADC_TypeDef *ADCx)
6592 if ((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL)
6628__STATIC_INLINE
void LL_ADC_SetMultimode(
ADC_Common_TypeDef *ADCxy_COMMON, uint32_t Multimode)
6700__STATIC_INLINE
void LL_ADC_SetMultiDMATransfer(
ADC_Common_TypeDef *ADCxy_COMMON, uint32_t MultiDMATransfer)
6788__STATIC_INLINE
void LL_ADC_SetMultiTwoSamplingDelay(
ADC_Common_TypeDef *ADCxy_COMMON, uint32_t MultiTwoSamplingDelay)
6821__STATIC_INLINE uint32_t LL_ADC_GetMultiTwoSamplingDelay(
ADC_Common_TypeDef *ADCxy_COMMON)
6847__STATIC_INLINE
void LL_ADC_EnableDeepPowerDown(
ADC_TypeDef *ADCx)
6852 MODIFY_REG(ADCx->
CR,
6853 ADC_CR_BITS_PROPERTY_RS,
6870__STATIC_INLINE
void LL_ADC_DisableDeepPowerDown(
ADC_TypeDef *ADCx)
6884__STATIC_INLINE uint32_t LL_ADC_IsDeepPowerDownEnabled(
ADC_TypeDef *ADCx)
6903__STATIC_INLINE
void LL_ADC_EnableInternalRegulator(
ADC_TypeDef *ADCx)
6908 MODIFY_REG(ADCx->
CR,
6909 ADC_CR_BITS_PROPERTY_RS,
6922__STATIC_INLINE
void LL_ADC_DisableInternalRegulator(
ADC_TypeDef *ADCx)
6933__STATIC_INLINE uint32_t LL_ADC_IsInternalRegulatorEnabled(
ADC_TypeDef *ADCx)
6954__STATIC_INLINE
void LL_ADC_Enable(
ADC_TypeDef *ADCx)
6959 MODIFY_REG(ADCx->
CR,
6960 ADC_CR_BITS_PROPERTY_RS,
6974__STATIC_INLINE
void LL_ADC_Disable(
ADC_TypeDef *ADCx)
6979 MODIFY_REG(ADCx->
CR,
6980 ADC_CR_BITS_PROPERTY_RS,
6993__STATIC_INLINE uint32_t LL_ADC_IsEnabled(
ADC_TypeDef *ADCx)
7004__STATIC_INLINE uint32_t LL_ADC_IsDisableOngoing(
ADC_TypeDef *ADCx)
7042__STATIC_INLINE
void LL_ADC_StartCalibration(
ADC_TypeDef *ADCx, uint32_t CalibrationMode, uint32_t SingleDiff)
7047 MODIFY_REG(ADCx->
CR,
7049 ADC_CR_ADCAL | (CalibrationMode & ADC_CALIB_MODE_MASK) | (SingleDiff & ADC_SINGLEDIFF_CALIB_START_MASK));
7058__STATIC_INLINE uint32_t LL_ADC_IsCalibrationOnGoing(
ADC_TypeDef *ADCx)
7090__STATIC_INLINE
void LL_ADC_REG_StartConversion(
ADC_TypeDef *ADCx)
7095 MODIFY_REG(ADCx->
CR,
7096 ADC_CR_BITS_PROPERTY_RS,
7110__STATIC_INLINE
void LL_ADC_REG_StopConversion(
ADC_TypeDef *ADCx)
7115 MODIFY_REG(ADCx->
CR,
7116 ADC_CR_BITS_PROPERTY_RS,
7126__STATIC_INLINE uint32_t LL_ADC_REG_IsConversionOngoing(
ADC_TypeDef *ADCx)
7137__STATIC_INLINE uint32_t LL_ADC_REG_IsStopConversionOngoing(
ADC_TypeDef *ADCx)
7151__STATIC_INLINE uint32_t LL_ADC_REG_ReadConversionData32(
ADC_TypeDef *ADCx)
7166__STATIC_INLINE uint16_t LL_ADC_REG_ReadConversionData16(
ADC_TypeDef *ADCx)
7181__STATIC_INLINE uint16_t LL_ADC_REG_ReadConversionData14(
ADC_TypeDef *ADCx)
7196__STATIC_INLINE uint16_t LL_ADC_REG_ReadConversionData12(
ADC_TypeDef *ADCx)
7211__STATIC_INLINE uint16_t LL_ADC_REG_ReadConversionData10(
ADC_TypeDef *ADCx)
7226__STATIC_INLINE uint8_t LL_ADC_REG_ReadConversionData8(
ADC_TypeDef *ADCx)
7251__STATIC_INLINE uint32_t LL_ADC_REG_ReadMultiConversionData32(
ADC_Common_TypeDef *ADCxy_COMMON, uint32_t ConversionData)
7253 return (uint32_t)(READ_BIT(ADCxy_COMMON->
CDR,
7255 >> (POSITION_VAL(ConversionData) & 0x1FUL)
7286__STATIC_INLINE
void LL_ADC_INJ_StartConversion(
ADC_TypeDef *ADCx)
7291 MODIFY_REG(ADCx->
CR,
7292 ADC_CR_BITS_PROPERTY_RS,
7306__STATIC_INLINE
void LL_ADC_INJ_StopConversion(
ADC_TypeDef *ADCx)
7311 MODIFY_REG(ADCx->
CR,
7312 ADC_CR_BITS_PROPERTY_RS,
7322__STATIC_INLINE uint32_t LL_ADC_INJ_IsConversionOngoing(
ADC_TypeDef *ADCx)
7333__STATIC_INLINE uint32_t LL_ADC_INJ_IsStopConversionOngoing(
ADC_TypeDef *ADCx)
7355__STATIC_INLINE uint32_t LL_ADC_INJ_ReadConversionData32(
ADC_TypeDef *ADCx, uint32_t Rank)
7357 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS));
7359 return (uint32_t)(READ_BIT(*preg,
7382__STATIC_INLINE uint16_t LL_ADC_INJ_ReadConversionData16(
ADC_TypeDef *ADCx, uint32_t Rank)
7384 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS));
7386 return (uint16_t)(READ_BIT(*preg,
7409__STATIC_INLINE uint16_t LL_ADC_INJ_ReadConversionData14(
ADC_TypeDef *ADCx, uint32_t Rank)
7411 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS));
7413 return (uint16_t)(READ_BIT(*preg,
7436__STATIC_INLINE uint16_t LL_ADC_INJ_ReadConversionData12(
ADC_TypeDef *ADCx, uint32_t Rank)
7438 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS));
7440 return (uint16_t)(READ_BIT(*preg,
7463__STATIC_INLINE uint16_t LL_ADC_INJ_ReadConversionData10(
ADC_TypeDef *ADCx, uint32_t Rank)
7465 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS));
7467 return (uint16_t)(READ_BIT(*preg,
7490__STATIC_INLINE uint8_t LL_ADC_INJ_ReadConversionData8(
ADC_TypeDef *ADCx, uint32_t Rank)
7492 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS));
7494 return (uint8_t)(READ_BIT(*preg,
7517__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_ADRDY(
ADC_TypeDef *ADCx)
7519 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_ADRDY) == (LL_ADC_FLAG_ADRDY)) ? 1UL : 0UL);
7528__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_EOC(
ADC_TypeDef *ADCx)
7539__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_EOS(
ADC_TypeDef *ADCx)
7541 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_EOS) == (LL_ADC_FLAG_EOS)) ? 1UL : 0UL);
7550__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_OVR(
ADC_TypeDef *ADCx)
7552 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_OVR) == (LL_ADC_FLAG_OVR)) ? 1UL : 0UL);
7561__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_EOSMP(
ADC_TypeDef *ADCx)
7563 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_EOSMP) == (LL_ADC_FLAG_EOSMP)) ? 1UL : 0UL);
7572__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_JEOC(
ADC_TypeDef *ADCx)
7574 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_JEOC) == (LL_ADC_FLAG_JEOC)) ? 1UL : 0UL);
7583__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_JEOS(
ADC_TypeDef *ADCx)
7585 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_JEOS) == (LL_ADC_FLAG_JEOS)) ? 1UL : 0UL);
7594__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_JQOVF(
ADC_TypeDef *ADCx)
7596 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_JQOVF) == (LL_ADC_FLAG_JQOVF)) ? 1UL : 0UL);
7605__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_LDORDY(
ADC_TypeDef *ADCx)
7607 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_LDORDY) == (LL_ADC_FLAG_LDORDY)) ? 1UL : 0UL);
7616__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_AWD1(
ADC_TypeDef *ADCx)
7618 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_AWD1) == (LL_ADC_FLAG_AWD1)) ? 1UL : 0UL);
7627__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_AWD2(
ADC_TypeDef *ADCx)
7629 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_AWD2) == (LL_ADC_FLAG_AWD2)) ? 1UL : 0UL);
7638__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_AWD3(
ADC_TypeDef *ADCx)
7640 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_AWD3) == (LL_ADC_FLAG_AWD3)) ? 1UL : 0UL);
7652__STATIC_INLINE
void LL_ADC_ClearFlag_ADRDY(
ADC_TypeDef *ADCx)
7654 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_ADRDY);
7663__STATIC_INLINE
void LL_ADC_ClearFlag_EOC(
ADC_TypeDef *ADCx)
7665 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_EOC);
7674__STATIC_INLINE
void LL_ADC_ClearFlag_EOS(
ADC_TypeDef *ADCx)
7676 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_EOS);
7685__STATIC_INLINE
void LL_ADC_ClearFlag_OVR(
ADC_TypeDef *ADCx)
7687 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_OVR);
7696__STATIC_INLINE
void LL_ADC_ClearFlag_EOSMP(
ADC_TypeDef *ADCx)
7698 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_EOSMP);
7707__STATIC_INLINE
void LL_ADC_ClearFlag_JEOC(
ADC_TypeDef *ADCx)
7709 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_JEOC);
7718__STATIC_INLINE
void LL_ADC_ClearFlag_JEOS(
ADC_TypeDef *ADCx)
7720 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_JEOS);
7729__STATIC_INLINE
void LL_ADC_ClearFlag_JQOVF(
ADC_TypeDef *ADCx)
7731 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_JQOVF);
7740__STATIC_INLINE
void LL_ADC_ClearFlag_AWD1(
ADC_TypeDef *ADCx)
7742 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_AWD1);
7751__STATIC_INLINE
void LL_ADC_ClearFlag_AWD2(
ADC_TypeDef *ADCx)
7753 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_AWD2);
7762__STATIC_INLINE
void LL_ADC_ClearFlag_AWD3(
ADC_TypeDef *ADCx)
7764 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_AWD3);
7774__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_ADRDY(
ADC_Common_TypeDef *ADCxy_COMMON)
7776 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_ADRDY_MST) == (LL_ADC_FLAG_ADRDY_MST)) ? 1UL : 0UL);
7786__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_ADRDY(
ADC_Common_TypeDef *ADCxy_COMMON)
7788 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_ADRDY_SLV) == (LL_ADC_FLAG_ADRDY_SLV)) ? 1UL : 0UL);
7798__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_EOC(
ADC_Common_TypeDef *ADCxy_COMMON)
7800 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_EOC_SLV) == (LL_ADC_FLAG_EOC_SLV)) ? 1UL : 0UL);
7810__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_EOC(
ADC_Common_TypeDef *ADCxy_COMMON)
7812 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_EOC_SLV) == (LL_ADC_FLAG_EOC_SLV)) ? 1UL : 0UL);
7822__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_EOS(
ADC_Common_TypeDef *ADCxy_COMMON)
7824 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_EOS_MST) == (LL_ADC_FLAG_EOS_MST)) ? 1UL : 0UL);
7834__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_EOS(
ADC_Common_TypeDef *ADCxy_COMMON)
7836 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_EOS_SLV) == (LL_ADC_FLAG_EOS_SLV)) ? 1UL : 0UL);
7846__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_OVR(
ADC_Common_TypeDef *ADCxy_COMMON)
7848 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_OVR_MST) == (LL_ADC_FLAG_OVR_MST)) ? 1UL : 0UL);
7858__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_OVR(
ADC_Common_TypeDef *ADCxy_COMMON)
7860 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_OVR_SLV) == (LL_ADC_FLAG_OVR_SLV)) ? 1UL : 0UL);
7870__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_EOSMP(
ADC_Common_TypeDef *ADCxy_COMMON)
7872 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_EOSMP_MST) == (LL_ADC_FLAG_EOSMP_MST)) ? 1UL : 0UL);
7882__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_EOSMP(
ADC_Common_TypeDef *ADCxy_COMMON)
7884 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_EOSMP_SLV) == (LL_ADC_FLAG_EOSMP_SLV)) ? 1UL : 0UL);
7894__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_JEOC(
ADC_Common_TypeDef *ADCxy_COMMON)
7896 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_JEOC_MST) == (LL_ADC_FLAG_JEOC_MST)) ? 1UL : 0UL);
7906__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_JEOC(
ADC_Common_TypeDef *ADCxy_COMMON)
7908 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_JEOC_SLV) == (LL_ADC_FLAG_JEOC_SLV)) ? 1UL : 0UL);
7918__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_JEOS(
ADC_Common_TypeDef *ADCxy_COMMON)
7920 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_JEOS_MST) == (LL_ADC_FLAG_JEOS_MST)) ? 1UL : 0UL);
7930__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_JEOS(
ADC_Common_TypeDef *ADCxy_COMMON)
7932 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_JEOS_SLV) == (LL_ADC_FLAG_JEOS_SLV)) ? 1UL : 0UL);
7942__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_JQOVF(
ADC_Common_TypeDef *ADCxy_COMMON)
7944 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_JQOVF_MST) == (LL_ADC_FLAG_JQOVF_MST)) ? 1UL : 0UL);
7954__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_JQOVF(
ADC_Common_TypeDef *ADCxy_COMMON)
7956 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_JQOVF_SLV) == (LL_ADC_FLAG_JQOVF_SLV)) ? 1UL : 0UL);
7966__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_AWD1(
ADC_Common_TypeDef *ADCxy_COMMON)
7968 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_AWD1_MST) == (LL_ADC_FLAG_AWD1_MST)) ? 1UL : 0UL);
7978__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_AWD1(
ADC_Common_TypeDef *ADCxy_COMMON)
7980 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_AWD1_SLV) == (LL_ADC_FLAG_AWD1_SLV)) ? 1UL : 0UL);
7990__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_AWD2(
ADC_Common_TypeDef *ADCxy_COMMON)
7992 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_AWD2_MST) == (LL_ADC_FLAG_AWD2_MST)) ? 1UL : 0UL);
8002__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_AWD2(
ADC_Common_TypeDef *ADCxy_COMMON)
8004 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_AWD2_SLV) == (LL_ADC_FLAG_AWD2_SLV)) ? 1UL : 0UL);
8014__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_AWD3(
ADC_Common_TypeDef *ADCxy_COMMON)
8016 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_AWD3_MST) == (LL_ADC_FLAG_AWD3_MST)) ? 1UL : 0UL);
8026__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_AWD3(
ADC_Common_TypeDef *ADCxy_COMMON)
8028 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_AWD3_SLV) == (LL_ADC_FLAG_AWD3_SLV)) ? 1UL : 0UL);
8046__STATIC_INLINE
void LL_ADC_EnableIT_ADRDY(
ADC_TypeDef *ADCx)
8048 SET_BIT(ADCx->
IER, LL_ADC_IT_ADRDY);
8057__STATIC_INLINE
void LL_ADC_EnableIT_EOC(
ADC_TypeDef *ADCx)
8059 SET_BIT(ADCx->
IER, LL_ADC_IT_EOC);
8068__STATIC_INLINE
void LL_ADC_EnableIT_EOS(
ADC_TypeDef *ADCx)
8070 SET_BIT(ADCx->
IER, LL_ADC_IT_EOS);
8079__STATIC_INLINE
void LL_ADC_EnableIT_OVR(
ADC_TypeDef *ADCx)
8081 SET_BIT(ADCx->
IER, LL_ADC_IT_OVR);
8090__STATIC_INLINE
void LL_ADC_EnableIT_EOSMP(
ADC_TypeDef *ADCx)
8092 SET_BIT(ADCx->
IER, LL_ADC_IT_EOSMP);
8101__STATIC_INLINE
void LL_ADC_EnableIT_JEOC(
ADC_TypeDef *ADCx)
8103 SET_BIT(ADCx->
IER, LL_ADC_IT_JEOC);
8112__STATIC_INLINE
void LL_ADC_EnableIT_JEOS(
ADC_TypeDef *ADCx)
8114 SET_BIT(ADCx->
IER, LL_ADC_IT_JEOS);
8123__STATIC_INLINE
void LL_ADC_EnableIT_JQOVF(
ADC_TypeDef *ADCx)
8125 SET_BIT(ADCx->
IER, LL_ADC_IT_JQOVF);
8134__STATIC_INLINE
void LL_ADC_EnableIT_AWD1(
ADC_TypeDef *ADCx)
8136 SET_BIT(ADCx->
IER, LL_ADC_IT_AWD1);
8145__STATIC_INLINE
void LL_ADC_EnableIT_AWD2(
ADC_TypeDef *ADCx)
8147 SET_BIT(ADCx->
IER, LL_ADC_IT_AWD2);
8156__STATIC_INLINE
void LL_ADC_EnableIT_AWD3(
ADC_TypeDef *ADCx)
8158 SET_BIT(ADCx->
IER, LL_ADC_IT_AWD3);
8167__STATIC_INLINE
void LL_ADC_DisableIT_ADRDY(
ADC_TypeDef *ADCx)
8169 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_ADRDY);
8178__STATIC_INLINE
void LL_ADC_DisableIT_EOC(
ADC_TypeDef *ADCx)
8180 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_EOC);
8189__STATIC_INLINE
void LL_ADC_DisableIT_EOS(
ADC_TypeDef *ADCx)
8191 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_EOS);
8200__STATIC_INLINE
void LL_ADC_DisableIT_OVR(
ADC_TypeDef *ADCx)
8202 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_OVR);
8211__STATIC_INLINE
void LL_ADC_DisableIT_EOSMP(
ADC_TypeDef *ADCx)
8213 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_EOSMP);
8222__STATIC_INLINE
void LL_ADC_DisableIT_JEOC(
ADC_TypeDef *ADCx)
8224 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_JEOC);
8233__STATIC_INLINE
void LL_ADC_DisableIT_JEOS(
ADC_TypeDef *ADCx)
8235 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_JEOS);
8244__STATIC_INLINE
void LL_ADC_DisableIT_JQOVF(
ADC_TypeDef *ADCx)
8246 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_JQOVF);
8255__STATIC_INLINE
void LL_ADC_DisableIT_AWD1(
ADC_TypeDef *ADCx)
8257 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_AWD1);
8266__STATIC_INLINE
void LL_ADC_DisableIT_AWD2(
ADC_TypeDef *ADCx)
8268 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_AWD2);
8277__STATIC_INLINE
void LL_ADC_DisableIT_AWD3(
ADC_TypeDef *ADCx)
8279 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_AWD3);
8289__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_ADRDY(
ADC_TypeDef *ADCx)
8291 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_ADRDY) == (LL_ADC_IT_ADRDY)) ? 1UL : 0UL);
8301__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_EOC(
ADC_TypeDef *ADCx)
8303 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_EOC) == (LL_ADC_IT_EOC)) ? 1UL : 0UL);
8313__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_EOS(
ADC_TypeDef *ADCx)
8315 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_EOS) == (LL_ADC_IT_EOS)) ? 1UL : 0UL);
8325__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_OVR(
ADC_TypeDef *ADCx)
8327 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_OVR) == (LL_ADC_IT_OVR)) ? 1UL : 0UL);
8337__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_EOSMP(
ADC_TypeDef *ADCx)
8339 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_EOSMP) == (LL_ADC_IT_EOSMP)) ? 1UL : 0UL);
8349__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_JEOC(
ADC_TypeDef *ADCx)
8351 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_JEOC) == (LL_ADC_IT_JEOC)) ? 1UL : 0UL);
8361__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_JEOS(
ADC_TypeDef *ADCx)
8363 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_JEOS) == (LL_ADC_IT_JEOS)) ? 1UL : 0UL);
8373__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_JQOVF(
ADC_TypeDef *ADCx)
8375 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_JQOVF) == (LL_ADC_IT_JQOVF)) ? 1UL : 0UL);
8385__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_AWD1(
ADC_TypeDef *ADCx)
8387 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_AWD1) == (LL_ADC_IT_AWD1)) ? 1UL : 0UL);
8397__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_AWD2(
ADC_TypeDef *ADCx)
8399 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_AWD2) == (LL_ADC_IT_AWD2)) ? 1UL : 0UL);
8409__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_AWD3(
ADC_TypeDef *ADCx)
8411 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_AWD3) == (LL_ADC_IT_AWD3)) ? 1UL : 0UL);
8418#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
8426ErrorStatus LL_ADC_CommonInit(
ADC_Common_TypeDef *ADCxy_COMMON, LL_ADC_CommonInitTypeDef *ADC_CommonInitStruct);
8427void LL_ADC_CommonStructInit(LL_ADC_CommonInitTypeDef *ADC_CommonInitStruct);
8434ErrorStatus LL_ADC_Init(
ADC_TypeDef *ADCx, LL_ADC_InitTypeDef *ADC_InitStruct);
8435void LL_ADC_StructInit(LL_ADC_InitTypeDef *ADC_InitStruct);
8438ErrorStatus LL_ADC_REG_Init(
ADC_TypeDef *ADCx, LL_ADC_REG_InitTypeDef *ADC_REG_InitStruct);
8439void LL_ADC_REG_StructInit(LL_ADC_REG_InitTypeDef *ADC_REG_InitStruct);
8442ErrorStatus LL_ADC_INJ_Init(
ADC_TypeDef *ADCx, LL_ADC_INJ_InitTypeDef *ADC_INJ_InitStruct);
8443void LL_ADC_INJ_StructInit(LL_ADC_INJ_InitTypeDef *ADC_INJ_InitStruct);
#define __IO
Definition: core_cm4.h:239
#define ADC_SMPR1_SMP0
Definition: stm32h723xx.h:3032
#define ADC3_CFGR_DMAEN
Definition: stm32h723xx.h:2941
#define ADC_CCR_CKMODE
Definition: stm32h723xx.h:4078
#define ADC_CALFACT_CALFACT_S
Definition: stm32h723xx.h:3920
#define ADC_CCR_PRESC
Definition: stm32h723xx.h:4084
#define ADC_CFGR_JAUTO
Definition: stm32h723xx.h:2924
#define ADC_OFR1_OFFSET1_CH
Definition: stm32h723xx.h:3491
#define ADC_CFGR_DISCEN
Definition: stm32h723xx.h:2898
#define ADC_CALFACT2_LINCALFACT
Definition: stm32h723xx.h:3950
#define ADC_CR_ADSTART
Definition: stm32h723xx.h:2808
#define ADC_CR_ADEN
Definition: stm32h723xx.h:2802
#define ADC_CR_JADSTART
Definition: stm32h723xx.h:2811
#define ADC_CR_ADCALLIN
Definition: stm32h723xx.h:2825
#define ADC3_OFR1_OFFSETPOS
Definition: stm32h723xx.h:3508
#define ADC_JSQR_JSQ4
Definition: stm32h723xx.h:3451
#define ADC_CFGR2_TROVS
Definition: stm32h723xx.h:2973
#define ADC_JSQR_JSQ2
Definition: stm32h723xx.h:3433
#define ADC3_CFGR2_BULB
Definition: stm32h723xx.h:3025
#define ADC3_CFGR2_OVSR
Definition: stm32h723xx.h:3015
#define ADC3_TR1_AWDFILT
Definition: stm32h723xx.h:3213
#define ADC_CFGR_DISCNUM
Definition: stm32h723xx.h:2902
#define ADC_DIFSEL_DIFSEL
Definition: stm32h723xx.h:3895
#define ADC_CFGR_DMNGT
Definition: stm32h723xx.h:2860
#define ADC3_TR1_LT1
Definition: stm32h723xx.h:3209
#define ADC_CR_ADSTP
Definition: stm32h723xx.h:2814
#define ADC_CFGR_RES_0
Definition: stm32h723xx.h:2867
#define ADC_CR_ADVREGEN
Definition: stm32h723xx.h:2846
#define ADC3_CFGR_DMACFG
Definition: stm32h723xx.h:2944
#define ADC_CR_ADCALDIF
Definition: stm32h723xx.h:2852
#define ADC_CFGR2_OVSS
Definition: stm32h723xx.h:2965
#define ADC_CR_DEEPPWD
Definition: stm32h723xx.h:2849
#define ADC_CFGR2_ROVSE
Definition: stm32h723xx.h:2958
#define ADC_CFGR2_JOVSE
Definition: stm32h723xx.h:2961
#define ADC_OFR1_SSATE
Definition: stm32h723xx.h:3500
#define ADC_CFGR2_OVSR
Definition: stm32h723xx.h:2993
#define ADC_CFGR_AUTDLY
Definition: stm32h723xx.h:2894
#define ADC_CFGR2_RSHIFT4
Definition: stm32h723xx.h:2989
#define ADC_OFR1_OFFSET1
Definition: stm32h723xx.h:3461
#define ADC_CFGR_JAWD1EN
Definition: stm32h723xx.h:2921
#define ADC_CFGR_JQDIS
Definition: stm32h723xx.h:2937
#define ADC_CFGR2_RSHIFT3
Definition: stm32h723xx.h:2986
#define ADC_CFGR2_RSHIFT1
Definition: stm32h723xx.h:2980
#define ADC_JSQR_JEXTSEL
Definition: stm32h723xx.h:3409
#define ADC3_OFR1_OFFSET1_EN
Definition: stm32h723xx.h:3515
#define ADC_CFGR_CONT
Definition: stm32h723xx.h:2891
#define ADC3_CFGR2_SMPTRIG
Definition: stm32h723xx.h:3028
#define ADC_CR_ADCAL
Definition: stm32h723xx.h:2855
#define ADC_CFGR_RES_1
Definition: stm32h723xx.h:2868
#define ADC_ISR_EOC
Definition: stm32h723xx.h:2735
#define ADC_CFGR_AWD1CH
Definition: stm32h723xx.h:2928
#define ADC3_TR1_HT1
Definition: stm32h723xx.h:3220
#define ADC_CCR_DELAY
Definition: stm32h723xx.h:4063
#define ADC_CCR_DAMDF
Definition: stm32h723xx.h:4072
#define ADC_JSQR_JL
Definition: stm32h723xx.h:3403
#define ADC_CFGR_AWD1EN
Definition: stm32h723xx.h:2918
#define ADC3_OFR1_SATEN
Definition: stm32h723xx.h:3511
#define ADC_CCR_VBATEN
Definition: stm32h723xx.h:4098
#define ADC_CFGR_EXTSEL
Definition: stm32h723xx.h:2873
#define ADC_DR_RDATA
Definition: stm32h723xx.h:3398
#define ADC_CFGR2_ROVSM
Definition: stm32h723xx.h:2976
#define ADC_LTR_LT
Definition: stm32h723xx.h:3199
#define ADC_CR_JADSTP
Definition: stm32h723xx.h:2817
#define ADC_JDR1_JDATA
Definition: stm32h723xx.h:3697
#define ADC_JSQR_JEXTEN
Definition: stm32h723xx.h:3418
#define ADC_CFGR2_RSHIFT2
Definition: stm32h723xx.h:2983
#define ADC_HTR_HT
Definition: stm32h723xx.h:3204
#define ADC_JSQR_JSQ1
Definition: stm32h723xx.h:3424
#define ADC_CR_ADDIS
Definition: stm32h723xx.h:2805
#define ADC_CFGR_AWD1SGL
Definition: stm32h723xx.h:2915
#define ADC_CFGR_JQM
Definition: stm32h723xx.h:2912
#define ADC_CCR_DUAL
Definition: stm32h723xx.h:4054
#define ADC_JSQR_JSQ3
Definition: stm32h723xx.h:3442
#define ADC_CR_BOOST
Definition: stm32h723xx.h:2820
#define ADC_SQR1_L
Definition: stm32h723xx.h:3243
#define ADC_CR_BOOST_0
Definition: stm32h723xx.h:2821
#define ADC3_CFGR_RES
Definition: stm32h723xx.h:2948
#define ADC_CFGR_JDISCEN
Definition: stm32h723xx.h:2909
#define ADC_CFGR_RES
Definition: stm32h723xx.h:2866
#define ADC_CCR_TSEN
Definition: stm32h723xx.h:4095
#define ADC_CCR_VREFEN
Definition: stm32h723xx.h:4092
#define ADC_CFGR_OVRMOD
Definition: stm32h723xx.h:2888
#define ADC_CFGR_EXTEN
Definition: stm32h723xx.h:2882
#define ADC_AWD2CR_AWD2CH_0
Definition: stm32h723xx.h:3846
CMSIS STM32H7xx Device Peripheral Access Layer Header File.
Definition: stm32h723xx.h:289
__IO uint32_t CDR
Definition: stm32h723xx.h:293
__IO uint32_t CSR
Definition: stm32h723xx.h:290
__IO uint32_t CCR
Definition: stm32h723xx.h:292
Analog to Digital Converter.
Definition: stm32h723xx.h:242
__IO uint32_t SQR1
Definition: stm32h723xx.h:255
__IO uint32_t CFGR2
Definition: stm32h723xx.h:247
__IO uint32_t CFGR
Definition: stm32h723xx.h:246
__IO uint32_t JSQR
Definition: stm32h723xx.h:262
__IO uint32_t CR
Definition: stm32h723xx.h:245
__IO uint32_t LTR1
Definition: stm32h742xx.h:250
__IO uint32_t CALFACT
Definition: stm32h742xx.h:282
__IO uint32_t DIFSEL
Definition: stm32h742xx.h:281
__IO uint32_t SMPR1
Definition: stm32h723xx.h:248
__IO uint32_t IER
Definition: stm32h723xx.h:244
__IO uint32_t CALFACT2
Definition: stm32h742xx.h:283
__IO uint32_t DR
Definition: stm32h723xx.h:259
__IO uint32_t DIFSEL_RES12
Definition: stm32h723xx.h:282
__IO uint32_t OFR1
Definition: stm32h723xx.h:264
__IO uint32_t JDR1
Definition: stm32h723xx.h:269
__IO uint32_t LTR2_DIFSEL
Definition: stm32h723xx.h:278
__IO uint32_t PCSEL_RES0
Definition: stm32h723xx.h:250
__IO uint32_t CALFACT_RES13
Definition: stm32h723xx.h:283
__IO uint32_t ISR
Definition: stm32h723xx.h:243
__IO uint32_t CALFACT2_RES14
Definition: stm32h723xx.h:284
__IO uint32_t PCSEL
Definition: stm32h742xx.h:249
__IO uint32_t LTR1_TR1
Definition: stm32h723xx.h:251