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#if defined (STM32H742xx) || defined (STM32H743xx) || defined (STM32H753xx)
392#define TEMPSENSOR_CAL2_TEMP ((((DBGMCU->IDCODE) >> 16) <= ((uint32_t)0x1003)) ? 110L : 130L)
396#define TEMPSENSOR_CAL2_TEMP (110L)
399#define TEMPSENSOR_CAL_VREFANALOG (3300UL)
402#define ADC_LINEAR_CALIB_REG_1_ADDR ((uint32_t*) (0x1FF1EC00UL))
403#define ADC_LINEAR_CALIB_REG_2_ADDR ((uint32_t*) (0x1FF1EC04UL))
404#define ADC_LINEAR_CALIB_REG_3_ADDR ((uint32_t*) (0x1FF1EC08UL))
405#define ADC_LINEAR_CALIB_REG_4_ADDR ((uint32_t*) (0x1FF1EC0CUL))
406#define ADC_LINEAR_CALIB_REG_5_ADDR ((uint32_t*) (0x1FF1EC10UL))
407#define ADC_LINEAR_CALIB_REG_6_ADDR ((uint32_t*) (0x1FF1EC14UL))
408#define ADC_LINEAR_CALIB_REG_COUNT (6UL)
417#define LL_ADC_SetChannelPreSelection LL_ADC_SetChannelPreselection
437#define __ADC_PTR_REG_OFFSET(__REG__, __REG_OFFFSET__) \
438 ((__IO uint32_t *)((uint32_t) ((uint32_t)(&(__REG__)) + ((__REG_OFFFSET__) << 2UL))))
446#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
464 uint32_t CommonClock;
477 uint32_t MultiDMATransfer;
482 uint32_t MultiTwoSamplingDelay;
487} LL_ADC_CommonInitTypeDef;
516 uint32_t LeftBitShift;
519 uint32_t LowPowerMode;
547 uint32_t TriggerSource;
555 uint32_t SequencerLength;
560 uint32_t SequencerDiscont;
567 uint32_t ContinuousMode;
573 uint32_t DataTransferMode;
584} LL_ADC_REG_InitTypeDef;
607 uint32_t TriggerSource;
615 uint32_t SequencerLength;
620 uint32_t SequencerDiscont;
633} LL_ADC_INJ_InitTypeDef;
651#define LL_ADC_FLAG_ADRDY ADC_ISR_ADRDY
652#define LL_ADC_FLAG_EOC ADC_ISR_EOC
653#define LL_ADC_FLAG_EOS ADC_ISR_EOS
654#define LL_ADC_FLAG_OVR ADC_ISR_OVR
655#define LL_ADC_FLAG_EOSMP ADC_ISR_EOSMP
656#define LL_ADC_FLAG_JEOC ADC_ISR_JEOC
657#define LL_ADC_FLAG_JEOS ADC_ISR_JEOS
658#define LL_ADC_FLAG_JQOVF ADC_ISR_JQOVF
659#define LL_ADC_FLAG_AWD1 ADC_ISR_AWD1
660#define LL_ADC_FLAG_AWD2 ADC_ISR_AWD2
661#define LL_ADC_FLAG_AWD3 ADC_ISR_AWD3
662#define LL_ADC_FLAG_LDORDY ADC_ISR_LDORDY
663#define LL_ADC_FLAG_ADRDY_MST ADC_CSR_ADRDY_MST
664#define LL_ADC_FLAG_ADRDY_SLV ADC_CSR_ADRDY_SLV
665#define LL_ADC_FLAG_EOC_MST ADC_CSR_EOC_MST
666#define LL_ADC_FLAG_EOC_SLV ADC_CSR_EOC_SLV
667#define LL_ADC_FLAG_EOS_MST ADC_CSR_EOS_MST
668#define LL_ADC_FLAG_EOS_SLV ADC_CSR_EOS_SLV
669#define LL_ADC_FLAG_OVR_MST ADC_CSR_OVR_MST
670#define LL_ADC_FLAG_OVR_SLV ADC_CSR_OVR_SLV
671#define LL_ADC_FLAG_EOSMP_MST ADC_CSR_EOSMP_MST
672#define LL_ADC_FLAG_EOSMP_SLV ADC_CSR_EOSMP_SLV
673#define LL_ADC_FLAG_JEOC_MST ADC_CSR_JEOC_MST
674#define LL_ADC_FLAG_JEOC_SLV ADC_CSR_JEOC_SLV
675#define LL_ADC_FLAG_JEOS_MST ADC_CSR_JEOS_MST
676#define LL_ADC_FLAG_JEOS_SLV ADC_CSR_JEOS_SLV
677#define LL_ADC_FLAG_JQOVF_MST ADC_CSR_JQOVF_MST
678#define LL_ADC_FLAG_JQOVF_SLV ADC_CSR_JQOVF_SLV
679#define LL_ADC_FLAG_AWD1_MST ADC_CSR_AWD1_MST
680#define LL_ADC_FLAG_AWD1_SLV ADC_CSR_AWD1_SLV
681#define LL_ADC_FLAG_AWD2_MST ADC_CSR_AWD2_MST
682#define LL_ADC_FLAG_AWD2_SLV ADC_CSR_AWD2_SLV
683#define LL_ADC_FLAG_AWD3_MST ADC_CSR_AWD3_MST
684#define LL_ADC_FLAG_AWD3_SLV ADC_CSR_AWD3_SLV
694#define LL_ADC_IT_ADRDY ADC_IER_ADRDYIE
695#define LL_ADC_IT_EOC ADC_IER_EOCIE
696#define LL_ADC_IT_EOS ADC_IER_EOSIE
697#define LL_ADC_IT_OVR ADC_IER_OVRIE
698#define LL_ADC_IT_EOSMP ADC_IER_EOSMPIE
699#define LL_ADC_IT_JEOC ADC_IER_JEOCIE
700#define LL_ADC_IT_JEOS ADC_IER_JEOSIE
701#define LL_ADC_IT_JQOVF ADC_IER_JQOVFIE
702#define LL_ADC_IT_AWD1 ADC_IER_AWD1IE
703#define LL_ADC_IT_AWD2 ADC_IER_AWD2IE
704#define LL_ADC_IT_AWD3 ADC_IER_AWD3IE
716#define LL_ADC_DMA_REG_REGULAR_DATA (0x00000000UL)
717#define LL_ADC_DMA_REG_REGULAR_DATA_MULTI (0x00000001UL)
726#define LL_ADC_CLOCK_SYNC_PCLK_DIV1 (ADC_CCR_CKMODE_0)
727#define LL_ADC_CLOCK_SYNC_PCLK_DIV2 (ADC_CCR_CKMODE_1 )
728#define LL_ADC_CLOCK_SYNC_PCLK_DIV4 (ADC_CCR_CKMODE_1 | ADC_CCR_CKMODE_0)
729#define LL_ADC_CLOCK_ASYNC_DIV1 (0x00000000UL)
730#define LL_ADC_CLOCK_ASYNC_DIV2 (ADC_CCR_PRESC_0)
731#define LL_ADC_CLOCK_ASYNC_DIV4 (ADC_CCR_PRESC_1 )
732#define LL_ADC_CLOCK_ASYNC_DIV6 (ADC_CCR_PRESC_1 | ADC_CCR_PRESC_0)
733#define LL_ADC_CLOCK_ASYNC_DIV8 (ADC_CCR_PRESC_2 )
734#define LL_ADC_CLOCK_ASYNC_DIV10 (ADC_CCR_PRESC_2 | ADC_CCR_PRESC_0)
735#define LL_ADC_CLOCK_ASYNC_DIV12 (ADC_CCR_PRESC_2 | ADC_CCR_PRESC_1 )
736#define LL_ADC_CLOCK_ASYNC_DIV16 (ADC_CCR_PRESC_2 | ADC_CCR_PRESC_1 | ADC_CCR_PRESC_0)
737#define LL_ADC_CLOCK_ASYNC_DIV32 (ADC_CCR_PRESC_3)
738#define LL_ADC_CLOCK_ASYNC_DIV64 (ADC_CCR_PRESC_3 | ADC_CCR_PRESC_0)
739#define LL_ADC_CLOCK_ASYNC_DIV128 (ADC_CCR_PRESC_3 | ADC_CCR_PRESC_1)
740#define LL_ADC_CLOCK_ASYNC_DIV256 (ADC_CCR_PRESC_3 | ADC_CCR_PRESC_1 | ADC_CCR_PRESC_0)
754#define LL_ADC_PATH_INTERNAL_NONE (0x00000000UL)
755#define LL_ADC_PATH_INTERNAL_VREFINT (ADC_CCR_VREFEN)
756#define LL_ADC_PATH_INTERNAL_TEMPSENSOR (ADC_CCR_TSEN)
757#define LL_ADC_PATH_INTERNAL_VBAT (ADC_CCR_VBATEN)
766#define LL_ADC_BOOST_MODE_6MHZ25 (0x00000000UL)
767#define LL_ADC_BOOST_MODE_12MHZ5 ( ADC_CR_BOOST_0)
768#define LL_ADC_BOOST_MODE_20MHZ ( ADC_CR_BOOST_1 )
769#define LL_ADC_BOOST_MODE_25MHZ ((ADC_CR_BOOST_0 <<2) | ADC_CR_BOOST_1 )
770#define LL_ADC_BOOST_MODE_50MHZ ((ADC_CR_BOOST_0 <<2) | ADC_CR_BOOST_1 | ADC_CR_BOOST_0)
779#define LL_ADC_CALIB_OFFSET (ADC_CALIB_FACTOR_OFFSET_REGOFFSET)
780#define LL_ADC_CALIB_LINEARITY (ADC_CALIB_FACTOR_LINEARITY_REGOFFSET)
781#define LL_ADC_CALIB_OFFSET_LINEARITY (ADC_CALIB_FACTOR_LINEARITY_REGOFFSET | ADC_CR_ADCALLIN)
790#define LL_ADC_CALIB_LINEARITY_WORD1 (ADC_CR_LINCALRDYW1)
791#define LL_ADC_CALIB_LINEARITY_WORD2 (ADC_CR_LINCALRDYW2)
792#define LL_ADC_CALIB_LINEARITY_WORD3 (ADC_CR_LINCALRDYW3)
793#define LL_ADC_CALIB_LINEARITY_WORD4 (ADC_CR_LINCALRDYW4)
794#define LL_ADC_CALIB_LINEARITY_WORD5 (ADC_CR_LINCALRDYW5)
795#define LL_ADC_CALIB_LINEARITY_WORD6 (ADC_CR_LINCALRDYW6)
804#define LL_ADC_RESOLUTION_16B (0x00000000UL)
805#define LL_ADC_RESOLUTION_14B ( ADC_CFGR_RES_0)
806#define LL_ADC_RESOLUTION_12B ( ADC_CFGR_RES_1 )
807#define LL_ADC_RESOLUTION_10B ( ADC_CFGR_RES_1 | ADC_CFGR_RES_0)
809#if defined (ADC_VER_V5_X)
810#define LL_ADC_RESOLUTION_14B_OPT (ADC_CFGR_RES_2 | ADC_CFGR_RES_0)
811#define LL_ADC_RESOLUTION_12B_OPT (ADC_CFGR_RES_2 | ADC_CFGR_RES_1 )
814#if defined (ADC_VER_V5_3) || defined(ADC_VER_V5_V90)
815#define LL_ADC_RESOLUTION_8B (ADC_CFGR_RES_2|ADC_CFGR_RES_1 | ADC_CFGR_RES_0)
817#define LL_ADC_RESOLUTION_8B (ADC_CFGR_RES_2 )
822#if defined(ADC_VER_V5_V90)
823#define LL_ADC_RESOLUTION_6B (ADC3_CFGR_RES_1 | ADC3_CFGR_RES_0)
829#if defined(ADC_VER_V5_V90)
834#define LL_ADC_DATA_ALIGN_RIGHT (0x00000000UL)
835#define LL_ADC_DATA_ALIGN_LEFT (ADC3_CFGR_ALIGN)
846#define LL_ADC_LEFT_BIT_SHIFT_NONE (0x00000000UL)
847#define LL_ADC_LEFT_BIT_SHIFT_1 (ADC_CFGR2_LSHIFT_0)
848#define LL_ADC_LEFT_BIT_SHIFT_2 (ADC_CFGR2_LSHIFT_1)
849#define LL_ADC_LEFT_BIT_SHIFT_3 (ADC_CFGR2_LSHIFT_1 | ADC_CFGR2_LSHIFT_0)
850#define LL_ADC_LEFT_BIT_SHIFT_4 (ADC_CFGR2_LSHIFT_2)
851#define LL_ADC_LEFT_BIT_SHIFT_5 (ADC_CFGR2_LSHIFT_2 | ADC_CFGR2_LSHIFT_0)
852#define LL_ADC_LEFT_BIT_SHIFT_6 (ADC_CFGR2_LSHIFT_2 | ADC_CFGR2_LSHIFT_1)
853#define LL_ADC_LEFT_BIT_SHIFT_7 (ADC_CFGR2_LSHIFT_2 | ADC_CFGR2_LSHIFT_1 | ADC_CFGR2_LSHIFT_0)
854#define LL_ADC_LEFT_BIT_SHIFT_8 (ADC_CFGR2_LSHIFT_3)
855#define LL_ADC_LEFT_BIT_SHIFT_9 (ADC_CFGR2_LSHIFT_3 | ADC_CFGR2_LSHIFT_0)
856#define LL_ADC_LEFT_BIT_SHIFT_10 (ADC_CFGR2_LSHIFT_3 | ADC_CFGR2_LSHIFT_1)
857#define LL_ADC_LEFT_BIT_SHIFT_11 (ADC_CFGR2_LSHIFT_3 | ADC_CFGR2_LSHIFT_1 | ADC_CFGR2_LSHIFT_0)
858#define LL_ADC_LEFT_BIT_SHIFT_12 (ADC_CFGR2_LSHIFT_3 | ADC_CFGR2_LSHIFT_2)
859#define LL_ADC_LEFT_BIT_SHIFT_13 (ADC_CFGR2_LSHIFT_3 | ADC_CFGR2_LSHIFT_2 | ADC_CFGR2_LSHIFT_0)
860#define LL_ADC_LEFT_BIT_SHIFT_14 (ADC_CFGR2_LSHIFT_3 | ADC_CFGR2_LSHIFT_2 | ADC_CFGR2_LSHIFT_1)
861#define LL_ADC_LEFT_BIT_SHIFT_15 (ADC_CFGR2_LSHIFT_3 | ADC_CFGR2_LSHIFT_2 | ADC_CFGR2_LSHIFT_1 | ADC_CFGR2_LSHIFT_0)
870#define LL_ADC_LP_MODE_NONE (0x00000000UL)
871#define LL_ADC_LP_AUTOWAIT (ADC_CFGR_AUTDLY)
880#define LL_ADC_OFFSET_1 ADC_OFR1_REGOFFSET
881#define LL_ADC_OFFSET_2 ADC_OFR2_REGOFFSET
882#define LL_ADC_OFFSET_3 ADC_OFR3_REGOFFSET
883#define LL_ADC_OFFSET_4 ADC_OFR4_REGOFFSET
892#define LL_ADC_OFFSET_SIGNED_SATURATION_DISABLE (0x00000000UL)
893#define LL_ADC_OFFSET_SIGNED_SATURATION_ENABLE (ADC_OFR1_SSATE)
902#define LL_ADC_OFFSET_RSHIFT_DISABLE (0x00000000UL)
903#define LL_ADC_OFFSET_RSHIFT_ENABLE (ADC_CFGR2_RSHIFT1)
907#if defined(ADC_VER_V5_V90)
912#define LL_ADC_OFFSET_SATURATION_DISABLE (0x00000000UL)
913#define LL_ADC_OFFSET_SATURATION_ENABLE (ADC3_OFR1_SATEN)
922#define LL_ADC_OFFSET_DISABLE (0x00000000UL)
923#define LL_ADC_OFFSET_ENABLE (ADC3_OFR1_OFFSET1_EN)
927#if defined(ADC_VER_V5_V90)
932#define LL_ADC_OFFSET_SIGN_NEGATIVE (0x00000000UL)
933#define LL_ADC_OFFSET_SIGN_POSITIVE (ADC3_OFR1_OFFSETPOS)
945#define LL_ADC_GROUP_REGULAR (0x00000001UL)
946#define LL_ADC_GROUP_INJECTED (0x00000002UL)
947#define LL_ADC_GROUP_REGULAR_INJECTED (0x00000003UL)
956#define LL_ADC_CHANNEL_0 (ADC_CHANNEL_0_NUMBER | ADC_CHANNEL_0_SMP | ADC_CHANNEL_0_BITFIELD )
957#define LL_ADC_CHANNEL_1 (ADC_CHANNEL_1_NUMBER | ADC_CHANNEL_1_SMP | ADC_CHANNEL_1_BITFIELD )
958#define LL_ADC_CHANNEL_2 (ADC_CHANNEL_2_NUMBER | ADC_CHANNEL_2_SMP | ADC_CHANNEL_2_BITFIELD )
959#define LL_ADC_CHANNEL_3 (ADC_CHANNEL_3_NUMBER | ADC_CHANNEL_3_SMP | ADC_CHANNEL_3_BITFIELD )
960#define LL_ADC_CHANNEL_4 (ADC_CHANNEL_4_NUMBER | ADC_CHANNEL_4_SMP | ADC_CHANNEL_4_BITFIELD )
961#define LL_ADC_CHANNEL_5 (ADC_CHANNEL_5_NUMBER | ADC_CHANNEL_5_SMP | ADC_CHANNEL_5_BITFIELD )
962#define LL_ADC_CHANNEL_6 (ADC_CHANNEL_6_NUMBER | ADC_CHANNEL_6_SMP | ADC_CHANNEL_6_BITFIELD )
963#define LL_ADC_CHANNEL_7 (ADC_CHANNEL_7_NUMBER | ADC_CHANNEL_7_SMP | ADC_CHANNEL_7_BITFIELD )
964#define LL_ADC_CHANNEL_8 (ADC_CHANNEL_8_NUMBER | ADC_CHANNEL_8_SMP | ADC_CHANNEL_8_BITFIELD )
965#define LL_ADC_CHANNEL_9 (ADC_CHANNEL_9_NUMBER | ADC_CHANNEL_9_SMP | ADC_CHANNEL_9_BITFIELD )
966#define LL_ADC_CHANNEL_10 (ADC_CHANNEL_10_NUMBER | ADC_CHANNEL_10_SMP | ADC_CHANNEL_10_BITFIELD)
967#define LL_ADC_CHANNEL_11 (ADC_CHANNEL_11_NUMBER | ADC_CHANNEL_11_SMP | ADC_CHANNEL_11_BITFIELD)
968#define LL_ADC_CHANNEL_12 (ADC_CHANNEL_12_NUMBER | ADC_CHANNEL_12_SMP | ADC_CHANNEL_12_BITFIELD)
969#define LL_ADC_CHANNEL_13 (ADC_CHANNEL_13_NUMBER | ADC_CHANNEL_13_SMP | ADC_CHANNEL_13_BITFIELD)
970#define LL_ADC_CHANNEL_14 (ADC_CHANNEL_14_NUMBER | ADC_CHANNEL_14_SMP | ADC_CHANNEL_14_BITFIELD)
971#define LL_ADC_CHANNEL_15 (ADC_CHANNEL_15_NUMBER | ADC_CHANNEL_15_SMP | ADC_CHANNEL_15_BITFIELD)
972#define LL_ADC_CHANNEL_16 (ADC_CHANNEL_16_NUMBER | ADC_CHANNEL_16_SMP | ADC_CHANNEL_16_BITFIELD)
973#define LL_ADC_CHANNEL_17 (ADC_CHANNEL_17_NUMBER | ADC_CHANNEL_17_SMP | ADC_CHANNEL_17_BITFIELD)
974#define LL_ADC_CHANNEL_18 (ADC_CHANNEL_18_NUMBER | ADC_CHANNEL_18_SMP | ADC_CHANNEL_18_BITFIELD)
975#define LL_ADC_CHANNEL_19 (ADC_CHANNEL_19_NUMBER | ADC_CHANNEL_19_SMP | ADC_CHANNEL_19_BITFIELD)
977#if defined(ADC_VER_V5_V90)
978#define LL_ADC_CHANNEL_VREFINT (LL_ADC_CHANNEL_18 | ADC_CHANNEL_ID_INTERNAL_CH)
979#define LL_ADC_CHANNEL_TEMPSENSOR (LL_ADC_CHANNEL_17 | ADC_CHANNEL_ID_INTERNAL_CH)
980#define LL_ADC_CHANNEL_VBAT (LL_ADC_CHANNEL_16 | ADC_CHANNEL_ID_INTERNAL_CH)
982#define LL_ADC_CHANNEL_VREFINT (LL_ADC_CHANNEL_19 | ADC_CHANNEL_ID_INTERNAL_CH)
983#define LL_ADC_CHANNEL_TEMPSENSOR (LL_ADC_CHANNEL_18 | ADC_CHANNEL_ID_INTERNAL_CH)
984#define LL_ADC_CHANNEL_VBAT (LL_ADC_CHANNEL_17 | ADC_CHANNEL_ID_INTERNAL_CH)
988#define LL_ADC_CHANNEL_VREFINT (LL_ADC_CHANNEL_19 | ADC_CHANNEL_ID_INTERNAL_CH)
989#define LL_ADC_CHANNEL_TEMPSENSOR (LL_ADC_CHANNEL_18 | ADC_CHANNEL_ID_INTERNAL_CH)
990#define LL_ADC_CHANNEL_VBAT (LL_ADC_CHANNEL_14 | ADC_CHANNEL_ID_INTERNAL_CH)
992#define LL_ADC_CHANNEL_DAC1CH1_ADC2 (LL_ADC_CHANNEL_16 | ADC_CHANNEL_ID_INTERNAL_CH)
993#define LL_ADC_CHANNEL_DAC1CH2_ADC2 (LL_ADC_CHANNEL_17 | ADC_CHANNEL_ID_INTERNAL_CH)
996#define LL_ADC_CHANNEL_DAC2CH1_ADC2 (LL_ADC_CHANNEL_15 | ADC_CHANNEL_ID_INTERNAL_CH)
1006#define LL_ADC_REG_TRIG_SOFTWARE (0x00000000UL)
1007#define LL_ADC_REG_TRIG_EXT_TIM1_CH1 (ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1008#define LL_ADC_REG_TRIG_EXT_TIM1_CH2 (ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1009#define LL_ADC_REG_TRIG_EXT_TIM1_CH3 (ADC_CFGR_EXTSEL_1 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1010#define LL_ADC_REG_TRIG_EXT_TIM2_CH2 (ADC_CFGR_EXTSEL_1 | ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1011#define LL_ADC_REG_TRIG_EXT_TIM3_TRGO (ADC_CFGR_EXTSEL_2 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1012#define LL_ADC_REG_TRIG_EXT_TIM4_CH4 (ADC_CFGR_EXTSEL_2 | ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1013#define LL_ADC_REG_TRIG_EXT_EXTI_LINE11 (ADC_CFGR_EXTSEL_2 | ADC_CFGR_EXTSEL_1 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1014#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)
1015#define LL_ADC_REG_TRIG_EXT_TIM8_TRGO2 (ADC_CFGR_EXTSEL_3 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1016#define LL_ADC_REG_TRIG_EXT_TIM1_TRGO (ADC_CFGR_EXTSEL_3 | ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1017#define LL_ADC_REG_TRIG_EXT_TIM1_TRGO2 (ADC_CFGR_EXTSEL_3 | ADC_CFGR_EXTSEL_1 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1018#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)
1019#define LL_ADC_REG_TRIG_EXT_TIM4_TRGO (ADC_CFGR_EXTSEL_3 | ADC_CFGR_EXTSEL_2 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1020#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)
1021#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)
1022#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)
1023#define LL_ADC_REG_TRIG_EXT_HRTIM_TRG1 (ADC_CFGR_EXTSEL_4 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1024#define LL_ADC_REG_TRIG_EXT_HRTIM_TRG3 (ADC_CFGR_EXTSEL_4 | ADC_CFGR_EXTSEL_0 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1025#define LL_ADC_REG_TRIG_EXT_LPTIM1_OUT (ADC_CFGR_EXTSEL_4 | ADC_CFGR_EXTSEL_1 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1026#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)
1027#define LL_ADC_REG_TRIG_EXT_LPTIM3_OUT (ADC_CFGR_EXTSEL_4 | ADC_CFGR_EXTSEL_2 | ADC_REG_TRIG_EXT_EDGE_DEFAULT)
1029#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)
1032#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)
1042#define LL_ADC_REG_TRIG_EXT_RISING ( ADC_CFGR_EXTEN_0)
1043#define LL_ADC_REG_TRIG_EXT_FALLING (ADC_CFGR_EXTEN_1 )
1044#define LL_ADC_REG_TRIG_EXT_RISINGFALLING (ADC_CFGR_EXTEN_1 | ADC_CFGR_EXTEN_0)
1048#if defined(ADC_VER_V5_V90)
1053#define LL_ADC_REG_SAMPLING_MODE_NORMAL (0x00000000UL)
1054#define LL_ADC_REG_SAMPLING_MODE_BULB (ADC3_CFGR2_BULB)
1056#define LL_ADC_REG_SAMPLING_MODE_TRIGGER_CONTROLED (ADC3_CFGR2_SMPTRIG)
1068#define LL_ADC_REG_CONV_SINGLE (0x00000000UL)
1069#define LL_ADC_REG_CONV_CONTINUOUS (ADC_CFGR_CONT)
1078#define LL_ADC_REG_DR_TRANSFER (0x00000000UL)
1079#define LL_ADC_REG_DMA_TRANSFER_LIMITED ( ADC_CFGR_DMNGT_0)
1080#define LL_ADC_REG_DMA_TRANSFER_UNLIMITED (ADC_CFGR_DMNGT_1 | ADC_CFGR_DMNGT_0)
1081#define LL_ADC_REG_DFSDM_TRANSFER (ADC_CFGR_DMNGT_1 )
1086#if defined(ADC_VER_V5_V90)
1092#define LL_ADC3_REG_DMA_TRANSFER_NONE (0x00000000UL)
1093#define LL_ADC3_REG_DMA_TRANSFER_LIMITED ( ADC3_CFGR_DMAEN)
1094#define LL_ADC3_REG_DMA_TRANSFER_UNLIMITED (ADC3_CFGR_DMACFG | ADC3_CFGR_DMAEN)
1104#define LL_ADC_REG_OVR_DATA_PRESERVED (0x00000000UL)
1105#define LL_ADC_REG_OVR_DATA_OVERWRITTEN (ADC_CFGR_OVRMOD)
1114#define LL_ADC_REG_SEQ_SCAN_DISABLE (0x00000000UL)
1115#define LL_ADC_REG_SEQ_SCAN_ENABLE_2RANKS ( ADC_SQR1_L_0)
1116#define LL_ADC_REG_SEQ_SCAN_ENABLE_3RANKS ( ADC_SQR1_L_1 )
1117#define LL_ADC_REG_SEQ_SCAN_ENABLE_4RANKS ( ADC_SQR1_L_1 | ADC_SQR1_L_0)
1118#define LL_ADC_REG_SEQ_SCAN_ENABLE_5RANKS ( ADC_SQR1_L_2 )
1119#define LL_ADC_REG_SEQ_SCAN_ENABLE_6RANKS ( ADC_SQR1_L_2 | ADC_SQR1_L_0)
1120#define LL_ADC_REG_SEQ_SCAN_ENABLE_7RANKS ( ADC_SQR1_L_2 | ADC_SQR1_L_1 )
1121#define LL_ADC_REG_SEQ_SCAN_ENABLE_8RANKS ( ADC_SQR1_L_2 | ADC_SQR1_L_1 | ADC_SQR1_L_0)
1122#define LL_ADC_REG_SEQ_SCAN_ENABLE_9RANKS (ADC_SQR1_L_3 )
1123#define LL_ADC_REG_SEQ_SCAN_ENABLE_10RANKS (ADC_SQR1_L_3 | ADC_SQR1_L_0)
1124#define LL_ADC_REG_SEQ_SCAN_ENABLE_11RANKS (ADC_SQR1_L_3 | ADC_SQR1_L_1 )
1125#define LL_ADC_REG_SEQ_SCAN_ENABLE_12RANKS (ADC_SQR1_L_3 | ADC_SQR1_L_1 | ADC_SQR1_L_0)
1126#define LL_ADC_REG_SEQ_SCAN_ENABLE_13RANKS (ADC_SQR1_L_3 | ADC_SQR1_L_2 )
1127#define LL_ADC_REG_SEQ_SCAN_ENABLE_14RANKS (ADC_SQR1_L_3 | ADC_SQR1_L_2 | ADC_SQR1_L_0)
1128#define LL_ADC_REG_SEQ_SCAN_ENABLE_15RANKS (ADC_SQR1_L_3 | ADC_SQR1_L_2 | ADC_SQR1_L_1 )
1129#define LL_ADC_REG_SEQ_SCAN_ENABLE_16RANKS (ADC_SQR1_L_3 | ADC_SQR1_L_2 | ADC_SQR1_L_1 | ADC_SQR1_L_0)
1138#define LL_ADC_REG_SEQ_DISCONT_DISABLE (0x00000000UL)
1139#define LL_ADC_REG_SEQ_DISCONT_1RANK ( ADC_CFGR_DISCEN)
1140#define LL_ADC_REG_SEQ_DISCONT_2RANKS ( ADC_CFGR_DISCNUM_0 | ADC_CFGR_DISCEN)
1141#define LL_ADC_REG_SEQ_DISCONT_3RANKS ( ADC_CFGR_DISCNUM_1 | ADC_CFGR_DISCEN)
1142#define LL_ADC_REG_SEQ_DISCONT_4RANKS ( ADC_CFGR_DISCNUM_1 | ADC_CFGR_DISCNUM_0 | ADC_CFGR_DISCEN)
1143#define LL_ADC_REG_SEQ_DISCONT_5RANKS (ADC_CFGR_DISCNUM_2 | ADC_CFGR_DISCEN)
1144#define LL_ADC_REG_SEQ_DISCONT_6RANKS (ADC_CFGR_DISCNUM_2 | ADC_CFGR_DISCNUM_0 | ADC_CFGR_DISCEN)
1145#define LL_ADC_REG_SEQ_DISCONT_7RANKS (ADC_CFGR_DISCNUM_2 | ADC_CFGR_DISCNUM_1 | ADC_CFGR_DISCEN)
1146#define LL_ADC_REG_SEQ_DISCONT_8RANKS (ADC_CFGR_DISCNUM_2 | ADC_CFGR_DISCNUM_1 | ADC_CFGR_DISCNUM_0 | ADC_CFGR_DISCEN)
1155#define LL_ADC_REG_RANK_1 (ADC_SQR1_REGOFFSET | ADC_REG_RANK_1_SQRX_BITOFFSET_POS)
1156#define LL_ADC_REG_RANK_2 (ADC_SQR1_REGOFFSET | ADC_REG_RANK_2_SQRX_BITOFFSET_POS)
1157#define LL_ADC_REG_RANK_3 (ADC_SQR1_REGOFFSET | ADC_REG_RANK_3_SQRX_BITOFFSET_POS)
1158#define LL_ADC_REG_RANK_4 (ADC_SQR1_REGOFFSET | ADC_REG_RANK_4_SQRX_BITOFFSET_POS)
1159#define LL_ADC_REG_RANK_5 (ADC_SQR2_REGOFFSET | ADC_REG_RANK_5_SQRX_BITOFFSET_POS)
1160#define LL_ADC_REG_RANK_6 (ADC_SQR2_REGOFFSET | ADC_REG_RANK_6_SQRX_BITOFFSET_POS)
1161#define LL_ADC_REG_RANK_7 (ADC_SQR2_REGOFFSET | ADC_REG_RANK_7_SQRX_BITOFFSET_POS)
1162#define LL_ADC_REG_RANK_8 (ADC_SQR2_REGOFFSET | ADC_REG_RANK_8_SQRX_BITOFFSET_POS)
1163#define LL_ADC_REG_RANK_9 (ADC_SQR2_REGOFFSET | ADC_REG_RANK_9_SQRX_BITOFFSET_POS)
1164#define LL_ADC_REG_RANK_10 (ADC_SQR3_REGOFFSET | ADC_REG_RANK_10_SQRX_BITOFFSET_POS)
1165#define LL_ADC_REG_RANK_11 (ADC_SQR3_REGOFFSET | ADC_REG_RANK_11_SQRX_BITOFFSET_POS)
1166#define LL_ADC_REG_RANK_12 (ADC_SQR3_REGOFFSET | ADC_REG_RANK_12_SQRX_BITOFFSET_POS)
1167#define LL_ADC_REG_RANK_13 (ADC_SQR3_REGOFFSET | ADC_REG_RANK_13_SQRX_BITOFFSET_POS)
1168#define LL_ADC_REG_RANK_14 (ADC_SQR3_REGOFFSET | ADC_REG_RANK_14_SQRX_BITOFFSET_POS)
1169#define LL_ADC_REG_RANK_15 (ADC_SQR4_REGOFFSET | ADC_REG_RANK_15_SQRX_BITOFFSET_POS)
1170#define LL_ADC_REG_RANK_16 (ADC_SQR4_REGOFFSET | ADC_REG_RANK_16_SQRX_BITOFFSET_POS)
1179#define LL_ADC_INJ_TRIG_SOFTWARE (0x00000000UL)
1180#define LL_ADC_INJ_TRIG_EXT_TIM1_TRGO (ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1181#define LL_ADC_INJ_TRIG_EXT_TIM1_CH4 (ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1182#define LL_ADC_INJ_TRIG_EXT_TIM2_TRGO (ADC_JSQR_JEXTSEL_1 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1183#define LL_ADC_INJ_TRIG_EXT_TIM2_CH1 (ADC_JSQR_JEXTSEL_1 | ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1184#define LL_ADC_INJ_TRIG_EXT_TIM3_CH4 (ADC_JSQR_JEXTSEL_2 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1185#define LL_ADC_INJ_TRIG_EXT_TIM4_TRGO (ADC_JSQR_JEXTSEL_2 | ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1186#define LL_ADC_INJ_TRIG_EXT_EXTI_LINE15 (ADC_JSQR_JEXTSEL_2 | ADC_JSQR_JEXTSEL_1 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1187#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)
1188#define LL_ADC_INJ_TRIG_EXT_TIM1_TRGO2 (ADC_JSQR_JEXTSEL_3 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1189#define LL_ADC_INJ_TRIG_EXT_TIM8_TRGO (ADC_JSQR_JEXTSEL_3 | ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1190#define LL_ADC_INJ_TRIG_EXT_TIM8_TRGO2 (ADC_JSQR_JEXTSEL_3 | ADC_JSQR_JEXTSEL_1 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1191#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)
1192#define LL_ADC_INJ_TRIG_EXT_TIM3_TRGO (ADC_JSQR_JEXTSEL_3 | ADC_JSQR_JEXTSEL_2 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1193#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)
1194#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)
1195#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)
1197#define LL_ADC_INJ_TRIG_EXT_HRTIM_TRG2 (ADC_JSQR_JEXTSEL_4 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1198#define LL_ADC_INJ_TRIG_EXT_HRTIM_TRG4 (ADC_JSQR_JEXTSEL_4 | ADC_JSQR_JEXTSEL_0 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1200#define LL_ADC_INJ_TRIG_EXT_LPTIM1_OUT (ADC_JSQR_JEXTSEL_4 | ADC_JSQR_JEXTSEL_1 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1201#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)
1202#define LL_ADC_INJ_TRIG_EXT_LPTIM3_OUT (ADC_JSQR_JEXTSEL_4 | ADC_JSQR_JEXTSEL_2 | ADC_INJ_TRIG_EXT_EDGE_DEFAULT)
1203#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)
1204#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)
1213#define LL_ADC_INJ_TRIG_EXT_RISING ( ADC_JSQR_JEXTEN_0)
1214#define LL_ADC_INJ_TRIG_EXT_FALLING (ADC_JSQR_JEXTEN_1 )
1215#define LL_ADC_INJ_TRIG_EXT_RISINGFALLING (ADC_JSQR_JEXTEN_1 | ADC_JSQR_JEXTEN_0)
1224#define LL_ADC_INJ_TRIG_INDEPENDENT (0x00000000UL)
1225#define LL_ADC_INJ_TRIG_FROM_GRP_REGULAR (ADC_CFGR_JAUTO)
1234#define LL_ADC_INJ_QUEUE_2CONTEXTS_LAST_ACTIVE (0x00000000UL)
1235#define LL_ADC_INJ_QUEUE_2CONTEXTS_END_EMPTY (ADC_CFGR_JQM)
1236#define LL_ADC_INJ_QUEUE_DISABLE (ADC_CFGR_JQDIS)
1245#define LL_ADC_INJ_SEQ_SCAN_DISABLE (0x00000000UL)
1246#define LL_ADC_INJ_SEQ_SCAN_ENABLE_2RANKS ( ADC_JSQR_JL_0)
1247#define LL_ADC_INJ_SEQ_SCAN_ENABLE_3RANKS (ADC_JSQR_JL_1 )
1248#define LL_ADC_INJ_SEQ_SCAN_ENABLE_4RANKS (ADC_JSQR_JL_1 | ADC_JSQR_JL_0)
1257#define LL_ADC_INJ_SEQ_DISCONT_DISABLE (0x00000000UL)
1258#define LL_ADC_INJ_SEQ_DISCONT_1RANK (ADC_CFGR_JDISCEN)
1267#define LL_ADC_INJ_RANK_1 (ADC_JDR1_REGOFFSET | ADC_INJ_RANK_1_JSQR_BITOFFSET_POS)
1268#define LL_ADC_INJ_RANK_2 (ADC_JDR2_REGOFFSET | ADC_INJ_RANK_2_JSQR_BITOFFSET_POS)
1269#define LL_ADC_INJ_RANK_3 (ADC_JDR3_REGOFFSET | ADC_INJ_RANK_3_JSQR_BITOFFSET_POS)
1270#define LL_ADC_INJ_RANK_4 (ADC_JDR4_REGOFFSET | ADC_INJ_RANK_4_JSQR_BITOFFSET_POS)
1279#define LL_ADC_SAMPLINGTIME_1CYCLE_5 (0x00000000UL)
1280#define LL_ADC_SAMPLINGTIME_2CYCLES_5 ( ADC_SMPR2_SMP10_0)
1281#define LL_ADC_SAMPLINGTIME_8CYCLES_5 ( ADC_SMPR2_SMP10_1 )
1282#define LL_ADC_SAMPLINGTIME_16CYCLES_5 ( ADC_SMPR2_SMP10_1 | ADC_SMPR2_SMP10_0)
1283#define LL_ADC_SAMPLINGTIME_32CYCLES_5 (ADC_SMPR2_SMP10_2 )
1284#define LL_ADC_SAMPLINGTIME_64CYCLES_5 (ADC_SMPR2_SMP10_2 | ADC_SMPR2_SMP10_0)
1285#define LL_ADC_SAMPLINGTIME_387CYCLES_5 (ADC_SMPR2_SMP10_2 | ADC_SMPR2_SMP10_1 )
1286#define LL_ADC_SAMPLINGTIME_810CYCLES_5 (ADC_SMPR2_SMP10_2 | ADC_SMPR2_SMP10_1 | ADC_SMPR2_SMP10_0)
1290#if defined(ADC_VER_V5_V90)
1295#define LL_ADC_SAMPLINGTIME_ADC3_2CYCLES_5 (0x00000000UL)
1296#define LL_ADC_SAMPLINGTIME_ADC3_6CYCLES_5 ( ADC_SMPR2_SMP10_0)
1297#define LL_ADC_SAMPLINGTIME_ADC3_12CYCLES_5 ( ADC_SMPR2_SMP10_1 )
1298#define LL_ADC_SAMPLINGTIME_ADC3_24CYCLES_5 ( ADC_SMPR2_SMP10_1 | ADC_SMPR2_SMP10_0)
1299#define LL_ADC_SAMPLINGTIME_ADC3_47CYCLES_5 (ADC_SMPR2_SMP10_2 )
1300#define LL_ADC_SAMPLINGTIME_ADC3_92CYCLES_5 (ADC_SMPR2_SMP10_2 | ADC_SMPR2_SMP10_0)
1301#define LL_ADC_SAMPLINGTIME_ADC3_247CYCLES_5 (ADC_SMPR2_SMP10_2 | ADC_SMPR2_SMP10_1 )
1302#define LL_ADC_SAMPLINGTIME_ADC3_640CYCLES_5 (ADC_SMPR2_SMP10_2 | ADC_SMPR2_SMP10_1 | ADC_SMPR2_SMP10_0)
1312#define LL_ADC_SINGLE_ENDED ( ADC_CALFACT_CALFACT_S)
1313#define LL_ADC_DIFFERENTIAL_ENDED (ADC_CR_ADCALDIF | ADC_CALFACT_CALFACT_D)
1314#define LL_ADC_BOTH_SINGLE_DIFF_ENDED (LL_ADC_SINGLE_ENDED | LL_ADC_DIFFERENTIAL_ENDED)
1323#define LL_ADC_AWD1 (ADC_AWD_CR1_CHANNEL_MASK | ADC_AWD_CR1_REGOFFSET)
1324#define LL_ADC_AWD2 (ADC_AWD_CR23_CHANNEL_MASK | ADC_AWD_CR2_REGOFFSET)
1325#define LL_ADC_AWD3 (ADC_AWD_CR23_CHANNEL_MASK | ADC_AWD_CR3_REGOFFSET)
1334#define LL_ADC_AWD_DISABLE (0x00000000UL)
1335#define LL_ADC_AWD_ALL_CHANNELS_REG (ADC_AWD_CR23_CHANNEL_MASK | ADC_CFGR_AWD1EN )
1336#define LL_ADC_AWD_ALL_CHANNELS_INJ (ADC_AWD_CR23_CHANNEL_MASK | ADC_CFGR_JAWD1EN )
1337#define LL_ADC_AWD_ALL_CHANNELS_REG_INJ (ADC_AWD_CR23_CHANNEL_MASK | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN )
1338#define LL_ADC_AWD_CHANNEL_0_REG ((LL_ADC_CHANNEL_0 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1339#define LL_ADC_AWD_CHANNEL_0_INJ ((LL_ADC_CHANNEL_0 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1340#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)
1341#define LL_ADC_AWD_CHANNEL_1_REG ((LL_ADC_CHANNEL_1 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1342#define LL_ADC_AWD_CHANNEL_1_INJ ((LL_ADC_CHANNEL_1 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1343#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)
1344#define LL_ADC_AWD_CHANNEL_2_REG ((LL_ADC_CHANNEL_2 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1345#define LL_ADC_AWD_CHANNEL_2_INJ ((LL_ADC_CHANNEL_2 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1346#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)
1347#define LL_ADC_AWD_CHANNEL_3_REG ((LL_ADC_CHANNEL_3 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1348#define LL_ADC_AWD_CHANNEL_3_INJ ((LL_ADC_CHANNEL_3 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1349#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)
1350#define LL_ADC_AWD_CHANNEL_4_REG ((LL_ADC_CHANNEL_4 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1351#define LL_ADC_AWD_CHANNEL_4_INJ ((LL_ADC_CHANNEL_4 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1352#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)
1353#define LL_ADC_AWD_CHANNEL_5_REG ((LL_ADC_CHANNEL_5 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1354#define LL_ADC_AWD_CHANNEL_5_INJ ((LL_ADC_CHANNEL_5 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1355#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)
1356#define LL_ADC_AWD_CHANNEL_6_REG ((LL_ADC_CHANNEL_6 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1357#define LL_ADC_AWD_CHANNEL_6_INJ ((LL_ADC_CHANNEL_6 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1358#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)
1359#define LL_ADC_AWD_CHANNEL_7_REG ((LL_ADC_CHANNEL_7 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1360#define LL_ADC_AWD_CHANNEL_7_INJ ((LL_ADC_CHANNEL_7 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1361#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)
1362#define LL_ADC_AWD_CHANNEL_8_REG ((LL_ADC_CHANNEL_8 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1363#define LL_ADC_AWD_CHANNEL_8_INJ ((LL_ADC_CHANNEL_8 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1364#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)
1365#define LL_ADC_AWD_CHANNEL_9_REG ((LL_ADC_CHANNEL_9 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1366#define LL_ADC_AWD_CHANNEL_9_INJ ((LL_ADC_CHANNEL_9 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1367#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)
1368#define LL_ADC_AWD_CHANNEL_10_REG ((LL_ADC_CHANNEL_10 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1369#define LL_ADC_AWD_CHANNEL_10_INJ ((LL_ADC_CHANNEL_10 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1370#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)
1371#define LL_ADC_AWD_CHANNEL_11_REG ((LL_ADC_CHANNEL_11 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1372#define LL_ADC_AWD_CHANNEL_11_INJ ((LL_ADC_CHANNEL_11 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1373#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)
1374#define LL_ADC_AWD_CHANNEL_12_REG ((LL_ADC_CHANNEL_12 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1375#define LL_ADC_AWD_CHANNEL_12_INJ ((LL_ADC_CHANNEL_12 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1376#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)
1377#define LL_ADC_AWD_CHANNEL_13_REG ((LL_ADC_CHANNEL_13 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1378#define LL_ADC_AWD_CHANNEL_13_INJ ((LL_ADC_CHANNEL_13 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1379#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)
1380#define LL_ADC_AWD_CHANNEL_14_REG ((LL_ADC_CHANNEL_14 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1381#define LL_ADC_AWD_CHANNEL_14_INJ ((LL_ADC_CHANNEL_14 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1382#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)
1383#define LL_ADC_AWD_CHANNEL_15_REG ((LL_ADC_CHANNEL_15 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1384#define LL_ADC_AWD_CHANNEL_15_INJ ((LL_ADC_CHANNEL_15 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1385#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)
1386#define LL_ADC_AWD_CHANNEL_16_REG ((LL_ADC_CHANNEL_16 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1387#define LL_ADC_AWD_CHANNEL_16_INJ ((LL_ADC_CHANNEL_16 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1388#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)
1389#define LL_ADC_AWD_CHANNEL_17_REG ((LL_ADC_CHANNEL_17 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1390#define LL_ADC_AWD_CHANNEL_17_INJ ((LL_ADC_CHANNEL_17 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1391#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)
1392#define LL_ADC_AWD_CHANNEL_18_REG ((LL_ADC_CHANNEL_18 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1393#define LL_ADC_AWD_CHANNEL_18_INJ ((LL_ADC_CHANNEL_18 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1394#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)
1395#define LL_ADC_AWD_CHANNEL_19_REG ((LL_ADC_CHANNEL_19 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1396#define LL_ADC_AWD_CHANNEL_19_INJ ((LL_ADC_CHANNEL_19 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1397#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)
1398#define LL_ADC_AWD_CH_VREFINT_REG ((LL_ADC_CHANNEL_VREFINT & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1399#define LL_ADC_AWD_CH_VREFINT_INJ ((LL_ADC_CHANNEL_VREFINT & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1400#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)
1401#define LL_ADC_AWD_CH_TEMPSENSOR_REG ((LL_ADC_CHANNEL_TEMPSENSOR & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1402#define LL_ADC_AWD_CH_TEMPSENSOR_INJ ((LL_ADC_CHANNEL_TEMPSENSOR & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1403#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)
1404#define LL_ADC_AWD_CH_VBAT_REG ((LL_ADC_CHANNEL_VBAT & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1405#define LL_ADC_AWD_CH_VBAT_INJ ((LL_ADC_CHANNEL_VBAT & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1406#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)
1407#define LL_ADC_AWD_CH_DAC1CH1_ADC2_REG ((LL_ADC_CHANNEL_DAC1CH1_ADC2 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1408#define LL_ADC_AWD_CH_DAC1CH1_ADC2_INJ ((LL_ADC_CHANNEL_DAC1CH1_ADC2 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1409#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)
1410#define LL_ADC_AWD_CH_DAC1CH2_ADC2_REG ((LL_ADC_CHANNEL_DAC1CH2_ADC2 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL)
1411#define LL_ADC_AWD_CH_DAC1CH2_ADC2_INJ ((LL_ADC_CHANNEL_DAC1CH2_ADC2 & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL)
1412#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)
1421#define LL_ADC_AWD_THRESHOLD_HIGH (0x1UL)
1422#define LL_ADC_AWD_THRESHOLD_LOW (0x0UL)
1426#if defined(ADC_VER_V5_V90)
1431#define LL_ADC_AWD_FILTERING_NONE (0x00000000UL)
1432#define LL_ADC_AWD_FILTERING_2SAMPLES ( ADC3_TR1_AWDFILT_0)
1433#define LL_ADC_AWD_FILTERING_3SAMPLES ( ADC3_TR1_AWDFILT_1 )
1434#define LL_ADC_AWD_FILTERING_4SAMPLES ( ADC3_TR1_AWDFILT_1 | ADC3_TR1_AWDFILT_0)
1435#define LL_ADC_AWD_FILTERING_5SAMPLES (ADC3_TR1_AWDFILT_2 )
1436#define LL_ADC_AWD_FILTERING_6SAMPLES (ADC3_TR1_AWDFILT_2 | ADC3_TR1_AWDFILT_0)
1437#define LL_ADC_AWD_FILTERING_7SAMPLES (ADC3_TR1_AWDFILT_2 | ADC3_TR1_AWDFILT_1 )
1438#define LL_ADC_AWD_FILTERING_8SAMPLES (ADC3_TR1_AWDFILT_2 | ADC3_TR1_AWDFILT_1 | ADC3_TR1_AWDFILT_0)
1448#define LL_ADC_OVS_DISABLE (0x00000000UL)
1449#define LL_ADC_OVS_GRP_REGULAR_CONTINUED ( ADC_CFGR2_ROVSE)
1450#define LL_ADC_OVS_GRP_REGULAR_RESUMED (ADC_CFGR2_ROVSM | ADC_CFGR2_ROVSE)
1451#define LL_ADC_OVS_GRP_INJECTED ( ADC_CFGR2_JOVSE )
1452#define LL_ADC_OVS_GRP_INJ_REG_RESUMED ( ADC_CFGR2_JOVSE | ADC_CFGR2_ROVSE)
1461#define LL_ADC_OVS_REG_CONT (0x00000000UL)
1462#define LL_ADC_OVS_REG_DISCONT (ADC_CFGR2_TROVS)
1466#if defined(ADC_VER_V5_V90)
1471#define LL_ADC_OVS_RATIO_2 (0x00000000UL)
1472#define LL_ADC_OVS_RATIO_4 ( ADC3_CFGR2_OVSR_0)
1473#define LL_ADC_OVS_RATIO_8 ( ADC3_CFGR2_OVSR_1 )
1474#define LL_ADC_OVS_RATIO_16 ( ADC3_CFGR2_OVSR_1 | ADC3_CFGR2_OVSR_0)
1475#define LL_ADC_OVS_RATIO_32 (ADC3_CFGR2_OVSR_2 )
1476#define LL_ADC_OVS_RATIO_64 (ADC3_CFGR2_OVSR_2 | ADC3_CFGR2_OVSR_0)
1477#define LL_ADC_OVS_RATIO_128 (ADC3_CFGR2_OVSR_2 | ADC3_CFGR2_OVSR_1 )
1478#define LL_ADC_OVS_RATIO_256 (ADC3_CFGR2_OVSR_2 | ADC3_CFGR2_OVSR_1 | ADC3_CFGR2_OVSR_0)
1488#define LL_ADC_OVS_SHIFT_NONE (0x00000000UL)
1489#define LL_ADC_OVS_SHIFT_RIGHT_1 ( ADC_CFGR2_OVSS_0)
1490#define LL_ADC_OVS_SHIFT_RIGHT_2 ( ADC_CFGR2_OVSS_1 )
1491#define LL_ADC_OVS_SHIFT_RIGHT_3 ( ADC_CFGR2_OVSS_1 | ADC_CFGR2_OVSS_0)
1492#define LL_ADC_OVS_SHIFT_RIGHT_4 ( ADC_CFGR2_OVSS_2 )
1493#define LL_ADC_OVS_SHIFT_RIGHT_5 ( ADC_CFGR2_OVSS_2 | ADC_CFGR2_OVSS_0)
1494#define LL_ADC_OVS_SHIFT_RIGHT_6 ( ADC_CFGR2_OVSS_2 | ADC_CFGR2_OVSS_1 )
1495#define LL_ADC_OVS_SHIFT_RIGHT_7 ( ADC_CFGR2_OVSS_2 | ADC_CFGR2_OVSS_1 | ADC_CFGR2_OVSS_0)
1496#define LL_ADC_OVS_SHIFT_RIGHT_8 (ADC_CFGR2_OVSS_3 )
1497#define LL_ADC_OVS_SHIFT_RIGHT_9 (ADC_CFGR2_OVSS_3 | ADC_CFGR2_OVSS_0)
1498#define LL_ADC_OVS_SHIFT_RIGHT_10 (ADC_CFGR2_OVSS_3 | ADC_CFGR2_OVSS_1 )
1499#define LL_ADC_OVS_SHIFT_RIGHT_11 (ADC_CFGR2_OVSS_3 | ADC_CFGR2_OVSS_1 | ADC_CFGR2_OVSS_0)
1508#define LL_ADC_MULTI_INDEPENDENT (0x00000000UL)
1509#define LL_ADC_MULTI_DUAL_REG_SIMULT ( ADC_CCR_DUAL_2 | ADC_CCR_DUAL_1 )
1510#define LL_ADC_MULTI_DUAL_REG_INTERL ( ADC_CCR_DUAL_2 | ADC_CCR_DUAL_1 | ADC_CCR_DUAL_0)
1511#define LL_ADC_MULTI_DUAL_INJ_SIMULT ( ADC_CCR_DUAL_2 | ADC_CCR_DUAL_0)
1512#define LL_ADC_MULTI_DUAL_INJ_ALTERN (ADC_CCR_DUAL_3 | ADC_CCR_DUAL_0)
1513#define LL_ADC_MULTI_DUAL_REG_SIM_INJ_SIM ( ADC_CCR_DUAL_0)
1514#define LL_ADC_MULTI_DUAL_REG_SIM_INJ_ALT ( ADC_CCR_DUAL_1 )
1515#define LL_ADC_MULTI_DUAL_REG_INT_INJ_SIM ( ADC_CCR_DUAL_1 | ADC_CCR_DUAL_0)
1524#define LL_ADC_MULTI_REG_DMA_EACH_ADC (0x00000000UL)
1525#define LL_ADC_MULTI_REG_DMA_RES_32_10B (ADC_CCR_DAMDF_1 )
1526#define LL_ADC_MULTI_REG_DMA_RES_8B (ADC_CCR_DAMDF_1 | ADC_CCR_DAMDF_0)
1535#define LL_ADC_MULTI_TWOSMP_DELAY_1CYCLE_5 (0x00000000UL)
1536#define LL_ADC_MULTI_TWOSMP_DELAY_2CYCLES_5 ( ADC_CCR_DELAY_0)
1537#define LL_ADC_MULTI_TWOSMP_DELAY_3CYCLES_5 ( ADC_CCR_DELAY_1 )
1538#define LL_ADC_MULTI_TWOSMP_DELAY_4CYCLES_5 ( ADC_CCR_DELAY_1 | ADC_CCR_DELAY_0)
1539#define LL_ADC_MULTI_TWOSMP_DELAY_4CYCLES_5_8_BITS ( ADC_CCR_DELAY_2 | ADC_CCR_DELAY_1 | ADC_CCR_DELAY_0)
1540#define LL_ADC_MULTI_TWOSMP_DELAY_5CYCLES_5 ( ADC_CCR_DELAY_2 )
1541#define LL_ADC_MULTI_TWOSMP_DELAY_5CYCLES_5_10_BITS ( ADC_CCR_DELAY_2 | ADC_CCR_DELAY_1 | ADC_CCR_DELAY_0)
1542#define LL_ADC_MULTI_TWOSMP_DELAY_6CYCLES (ADC_CCR_DELAY_3 )
1543#define LL_ADC_MULTI_TWOSMP_DELAY_6CYCLES_5 ( ADC_CCR_DELAY_2 | ADC_CCR_DELAY_0)
1544#define LL_ADC_MULTI_TWOSMP_DELAY_6CYCLES_5_12_BITS ( ADC_CCR_DELAY_2 | ADC_CCR_DELAY_1 | ADC_CCR_DELAY_0)
1545#define LL_ADC_MULTI_TWOSMP_DELAY_7CYCLES_5 ( ADC_CCR_DELAY_2 | ADC_CCR_DELAY_1 | ADC_CCR_DELAY_0)
1546#define LL_ADC_MULTI_TWOSMP_DELAY_8CYCLES (ADC_CCR_DELAY_3 )
1547#define LL_ADC_MULTI_TWOSMP_DELAY_9CYCLES (ADC_CCR_DELAY_3 )
1556#define LL_ADC_MULTI_MASTER ( ADC_CDR_RDATA_MST)
1557#define LL_ADC_MULTI_SLAVE (ADC_CDR_RDATA_SLV )
1558#define LL_ADC_MULTI_MASTER_SLAVE (ADC_CDR_RDATA_SLV | ADC_CDR_RDATA_MST)
1596#define LL_ADC_DELAY_INTERNAL_REGUL_STAB_US ( 10UL)
1602#define LL_ADC_DELAY_VREFINT_STAB_US (5UL)
1608#define LL_ADC_DELAY_TEMPSENSOR_STAB_US ( 26UL)
1617#define LL_ADC_DELAY_CALIB_ENABLE_ADC_CYCLES ( 4UL)
1627#define ADC_LINEARITY_BIT_TOGGLE_TIMEOUT (524400UL)
1656#define LL_ADC_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
1664#define LL_ADC_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
1674#if defined(ADC_VER_V5_V90)
1691#define __LL_ADC12_RESOLUTION_TO_ADC3(__ADC_RESOLUTION__) \
1693 ((__ADC_RESOLUTION__) == LL_ADC_RESOLUTION_12B) \
1696 ((__ADC_RESOLUTION__) == LL_ADC_RESOLUTION_10B) \
1699 ((__ADC_RESOLUTION__) == LL_ADC_RESOLUTION_8B) \
1702 ((__ADC_RESOLUTION__) == LL_ADC_RESOLUTION_6B) \
1703 ?((ADC_CFGR_RES_2|ADC_CFGR_RES_1 | ADC_CFGR_RES_0)) \
1751#define __LL_ADC_CHANNEL_TO_DECIMAL_NB(__CHANNEL__) \
1752 ((((__CHANNEL__) & ADC_CHANNEL_ID_BITFIELD_MASK) == 0UL) \
1754 ((__CHANNEL__) & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS \
1758 (uint32_t)POSITION_VAL((__CHANNEL__)) \
1804#define __LL_ADC_DECIMAL_NB_TO_CHANNEL(__DECIMAL_NB__) \
1805 (((__DECIMAL_NB__) <= 9UL) \
1807 ((__DECIMAL_NB__) << ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) | \
1808 (ADC_AWD2CR_AWD2CH_0 << (__DECIMAL_NB__)) | \
1809 (ADC_SMPR1_REGOFFSET | (((3UL * (__DECIMAL_NB__))) << ADC_CHANNEL_SMPx_BITOFFSET_POS)) \
1813 ((__DECIMAL_NB__) << ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) | \
1814 (ADC_AWD2CR_AWD2CH_0 << (__DECIMAL_NB__)) | \
1815 (ADC_SMPR2_REGOFFSET | (((3UL * ((__DECIMAL_NB__) - 10UL))) << ADC_CHANNEL_SMPx_BITOFFSET_POS)) \
1870#define __LL_ADC_IS_CHANNEL_INTERNAL(__CHANNEL__) \
1871 (((__CHANNEL__) & ADC_CHANNEL_ID_INTERNAL_CH_MASK) != 0UL)
1939#define __LL_ADC_CHANNEL_INTERNAL_TO_EXTERNAL(__CHANNEL__) \
1940 ((__CHANNEL__) & ~ADC_CHANNEL_ID_INTERNAL_CH_MASK)
1969#define __LL_ADC_IS_CHANNEL_INTERNAL_AVAILABLE(__ADC_INSTANCE__, __CHANNEL__) \
1970 ((((__ADC_INSTANCE__) == ADC2) \
1972 ((__CHANNEL__) == LL_ADC_CHANNEL_DAC1CH1_ADC2) || \
1973 ((__CHANNEL__) == LL_ADC_CHANNEL_DAC1CH2_ADC2) \
1977 (((__ADC_INSTANCE__) == ADC3) \
1979 ((__CHANNEL__) == LL_ADC_CHANNEL_TEMPSENSOR) || \
1980 ((__CHANNEL__) == LL_ADC_CHANNEL_VBAT) || \
1981 ((__CHANNEL__) == LL_ADC_CHANNEL_VREFINT) \
1986#define __LL_ADC_IS_CHANNEL_INTERNAL_AVAILABLE(__ADC_INSTANCE__, __CHANNEL__) \
1987 ((((__ADC_INSTANCE__) == ADC2) \
1989 ((__CHANNEL__) == LL_ADC_CHANNEL_DAC1CH1_ADC2) || \
1990 ((__CHANNEL__) == LL_ADC_CHANNEL_DAC1CH2_ADC2) || \
1991 ((__CHANNEL__) == LL_ADC_CHANNEL_TEMPSENSOR) || \
1992 ((__CHANNEL__) == LL_ADC_CHANNEL_VBAT) || \
1993 ((__CHANNEL__) == LL_ADC_CHANNEL_VREFINT) \
2131#define __LL_ADC_ANALOGWD_CHANNEL_GROUP(__CHANNEL__, __GROUP__) \
2132 (((__GROUP__) == LL_ADC_GROUP_REGULAR) \
2133 ? (((__CHANNEL__) & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL) \
2135 ((__GROUP__) == LL_ADC_GROUP_INJECTED) \
2136 ? (((__CHANNEL__) & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL) \
2138 (((__CHANNEL__) & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL) \
2161#define __LL_ADC_ANALOGWD_SET_THRESHOLD_RESOLUTION(__ADC_RESOLUTION__, __AWD_THRESHOLD__) \
2162 ((__AWD_THRESHOLD__) << ((__ADC_RESOLUTION__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1U )))
2184#define __LL_ADC_ANALOGWD_GET_THRESHOLD_RESOLUTION(__ADC_RESOLUTION__, __AWD_THRESHOLD_16_BITS__) \
2185 ((__AWD_THRESHOLD_16_BITS__) >> ((__ADC_RESOLUTION__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1U )))
2200#define __LL_ADC_CALIB_FACTOR_SINGLE_DIFF(__CALIB_FACTOR_SINGLE_ENDED__, __CALIB_FACTOR_DIFFERENTIAL__) \
2201 (((__CALIB_FACTOR_DIFFERENTIAL__) << ADC_CALFACT_CALFACT_D_Pos) | (__CALIB_FACTOR_SINGLE_ENDED__))
2216#define __LL_ADC_MULTI_CONV_DATA_MASTER_SLAVE(__ADC_MULTI_MASTER_SLAVE__, __ADC_MULTI_CONV_DATA__) \
2217 (((__ADC_MULTI_CONV_DATA__) >> ((ADC_CDR_RDATA_SLV_Pos) & ~(__ADC_MULTI_MASTER_SLAVE__))) & ADC_CDR_RDATA_MST)
2231#define __LL_ADC_MULTI_INSTANCE_MASTER(__ADCx__) \
2232 ( ( ((__ADCx__) == ADC2) \
2249#if defined(ADC3_COMMON)
2250#define __LL_ADC_COMMON_INSTANCE(__ADCx__) \
2251 ((((__ADCx__) == ADC1) || ((__ADCx__) == ADC2)) \
2261#define __LL_ADC_COMMON_INSTANCE(__ADCx__) (ADC12_COMMON)
2281#if defined(ADC3_COMMON)
2282#define __LL_ADC_IS_ENABLED_ALL_COMMON_INSTANCE(__ADCXY_COMMON__) \
2283 (((__ADCXY_COMMON__) == ADC12_COMMON) \
2285 (LL_ADC_IsEnabled(ADC1) | \
2286 LL_ADC_IsEnabled(ADC2) ) \
2290 (LL_ADC_IsEnabled(ADC3)) \
2294#define __LL_ADC_IS_ENABLED_ALL_COMMON_INSTANCE(__ADCXY_COMMON__) \
2295 (LL_ADC_IsEnabled(ADC1) | LL_ADC_IsEnabled(ADC2))
2312#define __LL_ADC_DIGITAL_SCALE(__ADC_RESOLUTION__) \
2313 (0xFFFFUL >> ((__ADC_RESOLUTION__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)))
2315#if defined(ADC_VER_V5_V90)
2329#define __LL_ADC3_DIGITAL_SCALE(__ADC_RESOLUTION__) \
2330 (0xFFFUL >> ((__ADC_RESOLUTION__) >> (ADC_CFGR_RES_BITOFFSET_POS_ADC3 - 1UL)))
2352#if defined(ADC_VER_V5_X) || defined(ADC_VER_V5_V90)
2353#define __LL_ADC_CONVERT_DATA_RESOLUTION(__DATA__,\
2354 __ADC_RESOLUTION_CURRENT__,\
2355 __ADC_RESOLUTION_TARGET__) \
2356( (__ADC_RESOLUTION_CURRENT__ == LL_ADC_RESOLUTION_8B) \
2359 << (((__ADC_RESOLUTION_CURRENT__) & ~(ADC_CFGR_RES_1 | ADC_CFGR_RES_0) ) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \
2360 >> ((__ADC_RESOLUTION_TARGET__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \
2364 (__ADC_RESOLUTION_TARGET__ == LL_ADC_RESOLUTION_8B) \
2367 << ((__ADC_RESOLUTION_CURRENT__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \
2368 >> (((__ADC_RESOLUTION_TARGET__) & ~(ADC_CFGR_RES_1 | ADC_CFGR_RES_0) ) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \
2373 << ((__ADC_RESOLUTION_CURRENT__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \
2374 >> ((__ADC_RESOLUTION_TARGET__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \
2381#define __LL_ADC_CONVERT_DATA_RESOLUTION(__DATA__,\
2382 __ADC_RESOLUTION_CURRENT__,\
2383 __ADC_RESOLUTION_TARGET__) \
2384( (__ADC_RESOLUTION_CURRENT__ == LL_ADC_RESOLUTION_8B) \
2387 << (((__ADC_RESOLUTION_CURRENT__) & ~(ADC_CFGR_RES_1 | ADC_CFGR_RES_0) ) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \
2388 >> ((__ADC_RESOLUTION_TARGET__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \
2392 (__ADC_RESOLUTION_TARGET__ == LL_ADC_RESOLUTION_8B) \
2395 << ((__ADC_RESOLUTION_CURRENT__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \
2396 >> (((__ADC_RESOLUTION_TARGET__) & ~(ADC_CFGR_RES_1 | ADC_CFGR_RES_0) ) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \
2401 << ((__ADC_RESOLUTION_CURRENT__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \
2402 >> ((__ADC_RESOLUTION_TARGET__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \
2409#if defined(ADC_VER_V5_V90)
2428#define __LL_ADC_CONVERT_DATA_RESOLUTION_ADC3(__DATA__,\
2429 __ADC_RESOLUTION_CURRENT__,\
2430 __ADC_RESOLUTION_TARGET__) \
2432 << ((__ADC_RESOLUTION_CURRENT__) >> (ADC_CFGR_RES_BITOFFSET_POS_ADC3 - 1UL))) \
2433 >> ((__ADC_RESOLUTION_TARGET__) >> (ADC_CFGR_RES_BITOFFSET_POS_ADC3 - 1UL)) \
2453#define __LL_ADC_CALC_DATA_TO_VOLTAGE(__VREFANALOG_VOLTAGE__,\
2455 __ADC_RESOLUTION__) \
2456 ((__ADC_DATA__) * (__VREFANALOG_VOLTAGE__) \
2457 / __LL_ADC_DIGITAL_SCALE(__ADC_RESOLUTION__) \
2486#define __LL_ADC_CALC_VREFANALOG_VOLTAGE(__VREFINT_ADC_DATA__,\
2487 __ADC_RESOLUTION__) \
2488 (((uint32_t)(*VREFINT_CAL_ADDR) * VREFINT_CAL_VREF) \
2489 / __LL_ADC_CONVERT_DATA_RESOLUTION((__VREFINT_ADC_DATA__), \
2490 (__ADC_RESOLUTION__), \
2491 LL_ADC_RESOLUTION_16B) \
2540#define __LL_ADC_CALC_TEMPERATURE(__VREFANALOG_VOLTAGE__,\
2541 __TEMPSENSOR_ADC_DATA__,\
2542 __ADC_RESOLUTION__) \
2543 (((( ((int32_t)((__LL_ADC_CONVERT_DATA_RESOLUTION((__TEMPSENSOR_ADC_DATA__), \
2544 (__ADC_RESOLUTION__), \
2545 LL_ADC_RESOLUTION_16B) \
2546 * (__VREFANALOG_VOLTAGE__)) \
2547 / TEMPSENSOR_CAL_VREFANALOG) \
2548 - (int32_t) *TEMPSENSOR_CAL1_ADDR) \
2549 ) * (int32_t)(TEMPSENSOR_CAL2_TEMP - TEMPSENSOR_CAL1_TEMP) \
2550 ) / (int32_t)((int32_t)*TEMPSENSOR_CAL2_ADDR - (int32_t)*TEMPSENSOR_CAL1_ADDR) \
2551 ) + TEMPSENSOR_CAL1_TEMP \
2599#define __LL_ADC_CALC_TEMPERATURE_TYP_PARAMS(__TEMPSENSOR_TYP_AVGSLOPE__,\
2600 __TEMPSENSOR_TYP_CALX_V__,\
2601 __TEMPSENSOR_CALX_TEMP__,\
2602 __VREFANALOG_VOLTAGE__,\
2603 __TEMPSENSOR_ADC_DATA__,\
2604 __ADC_RESOLUTION__) \
2606 (int32_t)((((__TEMPSENSOR_ADC_DATA__) * (__VREFANALOG_VOLTAGE__)) \
2607 / __LL_ADC_DIGITAL_SCALE(__ADC_RESOLUTION__)) \
2610 (int32_t)(((__TEMPSENSOR_TYP_CALX_V__)) \
2613 ) / (int32_t)(__TEMPSENSOR_TYP_AVGSLOPE__) \
2614 ) + (int32_t)(__TEMPSENSOR_CALX_TEMP__) \
2667__STATIC_INLINE uint32_t LL_ADC_DMA_GetRegAddr(
ADC_TypeDef *ADCx, uint32_t Register)
2669 uint32_t data_reg_addr;
2671 if (Register == LL_ADC_DMA_REG_REGULAR_DATA)
2674 data_reg_addr = (uint32_t) & (ADCx->
DR);
2679 data_reg_addr = (uint32_t) & ((__LL_ADC_COMMON_INSTANCE(ADCx))->CDR);
2682 return data_reg_addr;
2728__STATIC_INLINE
void LL_ADC_SetCommonClock(
ADC_Common_TypeDef *ADCxy_COMMON, uint32_t CommonClock)
2796__STATIC_INLINE
void LL_ADC_SetCommonPathInternalCh(
ADC_Common_TypeDef *ADCxy_COMMON, uint32_t PathInternal)
2818__STATIC_INLINE uint32_t LL_ADC_GetCommonPathInternalCh(
ADC_Common_TypeDef *ADCxy_COMMON)
2853__STATIC_INLINE
void LL_ADC_SetCommonPathInternalChAdd(
ADC_Common_TypeDef *ADCxy_COMMON, uint32_t PathInternal)
2855 SET_BIT(ADCxy_COMMON->
CCR, PathInternal);
2877__STATIC_INLINE
void LL_ADC_SetCommonPathInternalChRem(
ADC_Common_TypeDef *ADCxy_COMMON, uint32_t PathInternal)
2879 CLEAR_BIT(ADCxy_COMMON->
CCR, PathInternal);
2925__STATIC_INLINE
void LL_ADC_SetCalibrationOffsetFactor(
ADC_TypeDef *ADCx, uint32_t SingleDiff, uint32_t CalibrationFactor)
2927#if defined(ADC_VER_V5_V90)
2929 SingleDiff & ADC_SINGLEDIFF_CALIB_FACTOR_MASK,
2930 CalibrationFactor << (((SingleDiff & ADC_SINGLEDIFF_CALIB_F_BIT_D_MASK) >> ADC_SINGLEDIFF_CALIB_F_BIT_D_SHIFT4) & ~(SingleDiff &
ADC_CALFACT_CALFACT_S)));
2933 SingleDiff & ADC_SINGLEDIFF_CALIB_FACTOR_MASK,
2934 CalibrationFactor << (((SingleDiff & ADC_SINGLEDIFF_CALIB_F_BIT_D_MASK) >> ADC_SINGLEDIFF_CALIB_F_BIT_D_SHIFT4) & ~(SingleDiff &
ADC_CALFACT_CALFACT_S)));
2956__STATIC_INLINE uint32_t LL_ADC_GetCalibrationOffsetFactor(
ADC_TypeDef *ADCx, uint32_t SingleDiff)
2962#if defined(ADC_VER_V5_V90)
2963 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));
2965 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));
2991__STATIC_INLINE
void LL_ADC_SetCalibrationLinearFactor(
ADC_TypeDef *ADCx, uint32_t LinearityWord, uint32_t CalibrationFactor)
2993#if defined(ADC_VER_V5_V90)
2996 uint32_t timeout_cpu_cycles = ADC_LINEARITY_BIT_TOGGLE_TIMEOUT;
2999 while ((READ_BIT(ADCx->
CR, LinearityWord) == 0UL) && (timeout_cpu_cycles > 0UL))
3001 timeout_cpu_cycles--;
3005 uint32_t timeout_cpu_cycles = ADC_LINEARITY_BIT_TOGGLE_TIMEOUT;
3008 while ((READ_BIT(ADCx->
CR, LinearityWord) == 0UL) && (timeout_cpu_cycles > 0UL))
3010 timeout_cpu_cycles--;
3031__STATIC_INLINE uint32_t LL_ADC_GetCalibrationLinearFactor(
ADC_TypeDef *ADCx, uint32_t LinearityWord)
3033 uint32_t timeout_cpu_cycles = ADC_LINEARITY_BIT_TOGGLE_TIMEOUT;
3034 CLEAR_BIT(ADCx->
CR, LinearityWord);
3035 while ((READ_BIT(ADCx->
CR, LinearityWord) != 0UL) && (timeout_cpu_cycles > 0UL))
3037 timeout_cpu_cycles--;
3039#if defined(ADC_VER_V5_V90)
3063__STATIC_INLINE
void LL_ADC_SetResolution(
ADC_TypeDef *ADCx, uint32_t Resolution)
3065#if defined(ADC_VER_V5_3)
3069#elif defined(ADC_VER_V5_V90)
3076 if ((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL)
3082 if (LL_ADC_RESOLUTION_8B == Resolution)
3093 if ((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL)
3099 if (LL_ADC_RESOLUTION_8B == Resolution)
3128__STATIC_INLINE uint32_t LL_ADC_GetResolution(
ADC_TypeDef *ADCx)
3130#if defined (ADC_VER_V5_3)
3134#elif defined(ADC_VER_V5_V90)
3143 return (LL_ADC_RESOLUTION_8B);
3152 if ((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL)
3160 return (LL_ADC_RESOLUTION_8B);
3222__STATIC_INLINE
void LL_ADC_SetLowPowerMode(
ADC_TypeDef *ADCx, uint32_t LowPowerMode)
3273__STATIC_INLINE uint32_t LL_ADC_GetLowPowerMode(
ADC_TypeDef *ADCx)
3309__STATIC_INLINE
void LL_ADC_SetChannelPreselection(
ADC_TypeDef *ADCx, uint32_t Channel)
3311#if defined(ADC_VER_V5_V90)
3315 ADCx->
PCSEL_RES0 |= (1UL << (__LL_ADC_CHANNEL_TO_DECIMAL_NB(Channel) & 0x1FUL));
3319 ADCx->
PCSEL |= (1UL << (__LL_ADC_CHANNEL_TO_DECIMAL_NB(Channel) & 0x1FUL));
3354__STATIC_INLINE uint32_t LL_ADC_GetChannelPreselection(
ADC_TypeDef *ADCx, uint32_t Channel)
3356#if defined(ADC_VER_V5_V90)
3360 return (uint32_t)(READ_BIT(ADCx->
PCSEL_RES0, 1UL << (__LL_ADC_CHANNEL_TO_DECIMAL_NB(Channel) & 0x1FUL)));
3368 return (uint32_t)(READ_BIT(ADCx->
PCSEL, 1UL << (__LL_ADC_CHANNEL_TO_DECIMAL_NB(Channel) & 0x1FUL)));
3445__STATIC_INLINE
void LL_ADC_SetOffset(
ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t Channel, uint32_t OffsetLevel)
3447 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3448#if defined(ADC_VER_V5_V90)
3460 (Channel & ADC_CHANNEL_ID_NUMBER_MASK) | OffsetLevel);
3527__STATIC_INLINE uint32_t LL_ADC_GetOffsetChannel(
ADC_TypeDef *ADCx, uint32_t Offsety)
3529 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3553__STATIC_INLINE uint32_t LL_ADC_GetOffsetLevel(
ADC_TypeDef *ADCx, uint32_t Offsety)
3555 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3576__STATIC_INLINE
void LL_ADC_SetDataRightShift(
ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t RigthShift)
3595__STATIC_INLINE uint32_t LL_ADC_GetDataRightShift(
ADC_TypeDef *ADCx, uint32_t Offsety)
3597 return (uint32_t)((READ_BIT(ADCx->
CFGR2, (
ADC_CFGR2_RSHIFT1 << (Offsety & 0x1FUL)))) >> (Offsety & 0x1FUL));
3618__STATIC_INLINE
void LL_ADC_SetOffsetSignedSaturation(
ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t OffsetSignedSaturation)
3620#if defined(ADC_VER_V5_V90)
3628 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3650__STATIC_INLINE uint32_t LL_ADC_GetOffsetSignedSaturation(
ADC_TypeDef *ADCx, uint32_t Offsety)
3652#if defined(ADC_VER_V5_V90)
3661 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3666#if defined(ADC_VER_V5_V90)
3689__STATIC_INLINE
void LL_ADC_SetOffsetSaturation(
ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t OffsetSaturation)
3693 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3718__STATIC_INLINE uint32_t LL_ADC_GetOffsetSaturation(
ADC_TypeDef *ADCx, uint32_t Offsety)
3722 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3753__STATIC_INLINE
void LL_ADC_SetOffsetSign(
ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t OffsetSign)
3757 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3782__STATIC_INLINE uint32_t LL_ADC_GetOffsetSign(
ADC_TypeDef *ADCx, uint32_t Offsety)
3786 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3822__STATIC_INLINE
void LL_ADC_SetOffsetState(
ADC_TypeDef *ADCx, uint32_t Offsety, uint32_t OffsetState)
3824 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3856__STATIC_INLINE uint32_t LL_ADC_GetOffsetState(
ADC_TypeDef *ADCx, uint32_t Offsety)
3858 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
OFR1, Offsety);
3924__STATIC_INLINE
void LL_ADC_REG_SetTriggerSource(
ADC_TypeDef *ADCx, uint32_t TriggerSource)
3968__STATIC_INLINE uint32_t LL_ADC_REG_GetTriggerSource(
ADC_TypeDef *ADCx)
3974 uint32_t ShiftExten = ((TriggerSource &
ADC_CFGR_EXTEN) >> (ADC_REG_TRIG_EXTEN_BITOFFSET_POS - 2UL));
3978 return ((TriggerSource
3995__STATIC_INLINE uint32_t LL_ADC_REG_IsTriggerSourceSWStart(
ADC_TypeDef *ADCx)
4015__STATIC_INLINE
void LL_ADC_REG_SetTriggerEdge(
ADC_TypeDef *ADCx, uint32_t ExternalTriggerEdge)
4030__STATIC_INLINE uint32_t LL_ADC_REG_GetTriggerEdge(
ADC_TypeDef *ADCx)
4035#if defined(ADC_VER_V5_V90)
4054__STATIC_INLINE
void LL_ADC_REG_SetSamplingMode(
ADC_TypeDef *ADCx, uint32_t SamplingMode)
4121__STATIC_INLINE
void LL_ADC_REG_SetSequencerLength(
ADC_TypeDef *ADCx, uint32_t SequencerNbRanks)
4175__STATIC_INLINE uint32_t LL_ADC_REG_GetSequencerLength(
ADC_TypeDef *ADCx)
4207__STATIC_INLINE
void LL_ADC_REG_SetSequencerDiscont(
ADC_TypeDef *ADCx, uint32_t SeqDiscont)
4230__STATIC_INLINE uint32_t LL_ADC_REG_GetSequencerDiscont(
ADC_TypeDef *ADCx)
4322__STATIC_INLINE
void LL_ADC_REG_SetSequencerRanks(
ADC_TypeDef *ADCx, uint32_t Rank, uint32_t Channel)
4328 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
SQR1, ((Rank & ADC_REG_SQRX_REGOFFSET_MASK) >> ADC_SQRX_REGOFFSET_POS));
4331 ADC_CHANNEL_ID_NUMBER_MASK_POSBIT0 << (Rank & ADC_REG_RANK_ID_SQRX_MASK),
4332 ((Channel & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (Rank & ADC_REG_RANK_ID_SQRX_MASK));
4424__STATIC_INLINE uint32_t LL_ADC_REG_GetSequencerRanks(
ADC_TypeDef *ADCx, uint32_t Rank)
4426 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
SQR1, ((Rank & ADC_REG_SQRX_REGOFFSET_MASK) >> ADC_SQRX_REGOFFSET_POS));
4428 return (uint32_t)((READ_BIT(*preg,
4429 ADC_CHANNEL_ID_NUMBER_MASK_POSBIT0 << (Rank & ADC_REG_RANK_ID_SQRX_MASK))
4430 >> (Rank & ADC_REG_RANK_ID_SQRX_MASK)) << ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS
4453__STATIC_INLINE
void LL_ADC_REG_SetContinuousMode(
ADC_TypeDef *ADCx, uint32_t Continuous)
4470__STATIC_INLINE uint32_t LL_ADC_REG_GetContinuousMode(
ADC_TypeDef *ADCx)
4486__STATIC_INLINE
void LL_ADC_REG_SetDataTransferMode(
ADC_TypeDef *ADCx, uint32_t DataTransferMode)
4491#if defined(ADC_VER_V5_V90)
4498__STATIC_INLINE
void LL_ADC_EnableDMAReq (
ADC_TypeDef *ADCx)
4503__STATIC_INLINE
void LL_ADC_DisableDMAReq(
ADC_TypeDef *ADCx)
4508__STATIC_INLINE uint32_t LL_ADC_IsEnabledDMAReq (
ADC_TypeDef *ADCx)
4547__STATIC_INLINE
void LL_ADC_REG_SetDMATransferMode(
ADC_TypeDef *ADCx, uint32_t DMATransfer)
4585__STATIC_INLINE uint32_t LL_ADC_REG_GetDMATransferMode(
ADC_TypeDef *ADCx)
4614__STATIC_INLINE uint32_t LL_ADC_REG_GetDataTransferMode(
ADC_TypeDef *ADCx)
4640__STATIC_INLINE
void LL_ADC_REG_SetOverrun(
ADC_TypeDef *ADCx, uint32_t Overrun)
4654__STATIC_INLINE uint32_t LL_ADC_REG_GetOverrun(
ADC_TypeDef *ADCx)
4712__STATIC_INLINE
void LL_ADC_INJ_SetTriggerSource(
ADC_TypeDef *ADCx, uint32_t TriggerSource)
4756__STATIC_INLINE uint32_t LL_ADC_INJ_GetTriggerSource(
ADC_TypeDef *ADCx)
4762 uint32_t ShiftJexten = ((TriggerSource &
ADC_JSQR_JEXTEN) >> (ADC_INJ_TRIG_EXTEN_BITOFFSET_POS - 2UL));
4766 return ((TriggerSource
4783__STATIC_INLINE uint32_t LL_ADC_INJ_IsTriggerSourceSWStart(
ADC_TypeDef *ADCx)
4803__STATIC_INLINE
void LL_ADC_INJ_SetTriggerEdge(
ADC_TypeDef *ADCx, uint32_t ExternalTriggerEdge)
4818__STATIC_INLINE uint32_t LL_ADC_INJ_GetTriggerEdge(
ADC_TypeDef *ADCx)
4844__STATIC_INLINE
void LL_ADC_INJ_SetSequencerLength(
ADC_TypeDef *ADCx, uint32_t SequencerNbRanks)
4865__STATIC_INLINE uint32_t LL_ADC_INJ_GetSequencerLength(
ADC_TypeDef *ADCx)
4883__STATIC_INLINE
void LL_ADC_INJ_SetSequencerDiscont(
ADC_TypeDef *ADCx, uint32_t SeqDiscont)
4898__STATIC_INLINE uint32_t LL_ADC_INJ_GetSequencerDiscont(
ADC_TypeDef *ADCx)
4961__STATIC_INLINE
void LL_ADC_INJ_SetSequencerRanks(
ADC_TypeDef *ADCx, uint32_t Rank, uint32_t Channel)
4967 MODIFY_REG(ADCx->
JSQR,
4968 (ADC_CHANNEL_ID_NUMBER_MASK >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (Rank & ADC_INJ_RANK_ID_JSQR_MASK),
4969 ((Channel & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (Rank & ADC_INJ_RANK_ID_JSQR_MASK));
5033__STATIC_INLINE uint32_t LL_ADC_INJ_GetSequencerRanks(
ADC_TypeDef *ADCx, uint32_t Rank)
5035 return (uint32_t)((READ_BIT(ADCx->
JSQR,
5036 (ADC_CHANNEL_ID_NUMBER_MASK >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (Rank & ADC_INJ_RANK_ID_JSQR_MASK))
5037 >> (Rank & ADC_INJ_RANK_ID_JSQR_MASK)) << ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS
5071__STATIC_INLINE
void LL_ADC_INJ_SetTrigAuto(
ADC_TypeDef *ADCx, uint32_t TrigAuto)
5085__STATIC_INLINE uint32_t LL_ADC_INJ_GetTrigAuto(
ADC_TypeDef *ADCx)
5131__STATIC_INLINE
void LL_ADC_INJ_SetQueueMode(
ADC_TypeDef *ADCx, uint32_t QueueMode)
5146__STATIC_INLINE uint32_t LL_ADC_INJ_GetQueueMode(
ADC_TypeDef *ADCx)
5347__STATIC_INLINE
void LL_ADC_INJ_ConfigQueueContext(
ADC_TypeDef *ADCx,
5348 uint32_t TriggerSource,
5349 uint32_t ExternalTriggerEdge,
5350 uint32_t SequencerNbRanks,
5351 uint32_t Rank1_Channel,
5352 uint32_t Rank2_Channel,
5353 uint32_t Rank3_Channel,
5354 uint32_t Rank4_Channel)
5362 uint32_t is_trigger_not_sw = (uint32_t)((TriggerSource != LL_ADC_INJ_TRIG_SOFTWARE) ? 1UL : 0UL);
5363 MODIFY_REG(ADCx->
JSQR,
5372 (ExternalTriggerEdge * (is_trigger_not_sw)) |
5373 (((Rank4_Channel & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (LL_ADC_INJ_RANK_4 & ADC_INJ_RANK_ID_JSQR_MASK)) |
5374 (((Rank3_Channel & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (LL_ADC_INJ_RANK_3 & ADC_INJ_RANK_ID_JSQR_MASK)) |
5375 (((Rank2_Channel & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (LL_ADC_INJ_RANK_2 & ADC_INJ_RANK_ID_JSQR_MASK)) |
5376 (((Rank1_Channel & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) << (LL_ADC_INJ_RANK_1 & ADC_INJ_RANK_ID_JSQR_MASK)) |
5478__STATIC_INLINE
void LL_ADC_SetChannelSamplingTime(
ADC_TypeDef *ADCx, uint32_t Channel, uint32_t SamplingTime)
5484 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
SMPR1, ((Channel & ADC_CHANNEL_SMPRX_REGOFFSET_MASK) >> ADC_SMPRX_REGOFFSET_POS));
5487 ADC_SMPR1_SMP0 << ((Channel & ADC_CHANNEL_SMPx_BITOFFSET_MASK) >> ADC_CHANNEL_SMPx_BITOFFSET_POS),
5488 SamplingTime << ((Channel & ADC_CHANNEL_SMPx_BITOFFSET_MASK) >> ADC_CHANNEL_SMPx_BITOFFSET_POS));
5563__STATIC_INLINE uint32_t LL_ADC_GetChannelSamplingTime(
ADC_TypeDef *ADCx, uint32_t Channel)
5565 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
SMPR1, ((Channel & ADC_CHANNEL_SMPRX_REGOFFSET_MASK) >> ADC_SMPRX_REGOFFSET_POS));
5567 return (uint32_t)(READ_BIT(*preg,
5568 ADC_SMPR1_SMP0 << ((Channel & ADC_CHANNEL_SMPx_BITOFFSET_MASK) >> ADC_CHANNEL_SMPx_BITOFFSET_POS))
5569 >> ((Channel & ADC_CHANNEL_SMPx_BITOFFSET_MASK) >> ADC_CHANNEL_SMPx_BITOFFSET_POS)
5624__STATIC_INLINE
void LL_ADC_SetChannelSingleDiff(
ADC_TypeDef *ADCx, uint32_t Channel, uint32_t SingleDiff)
5626#if defined(ADC_VER_V5_V90)
5633 Channel & ADC_SINGLEDIFF_CHANNEL_MASK,
5634 (Channel & ADC_SINGLEDIFF_CHANNEL_MASK) & (
ADC_DIFSEL_DIFSEL >> (SingleDiff & ADC_SINGLEDIFF_CHANNEL_SHIFT_MASK)));
5639 Channel & ADC_SINGLEDIFF_CHANNEL_MASK,
5640 (Channel & ADC_SINGLEDIFF_CHANNEL_MASK) & (
ADC_DIFSEL_DIFSEL >> (SingleDiff & ADC_SINGLEDIFF_CHANNEL_SHIFT_MASK)));
5647 Channel & ADC_SINGLEDIFF_CHANNEL_MASK,
5648 (Channel & ADC_SINGLEDIFF_CHANNEL_MASK) & (
ADC_DIFSEL_DIFSEL >> (SingleDiff & ADC_SINGLEDIFF_CHANNEL_SHIFT_MASK)));
5695__STATIC_INLINE uint32_t LL_ADC_GetChannelSingleDiff(
ADC_TypeDef *ADCx, uint32_t Channel)
5697#if defined(ADC_VER_V5_V90)
5698 return (uint32_t)(READ_BIT(ADCx->
DIFSEL_RES12, (Channel & ADC_SINGLEDIFF_CHANNEL_MASK)));
5700 return (uint32_t)(READ_BIT(ADCx->
DIFSEL, (Channel & ADC_SINGLEDIFF_CHANNEL_MASK)));
5844__STATIC_INLINE
void LL_ADC_SetAnalogWDMonitChannels(
ADC_TypeDef *ADCx, uint32_t AWDy, uint32_t AWDChannelGroup)
5850 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
CFGR, ((AWDy & ADC_AWD_CRX_REGOFFSET_MASK) >> ADC_AWD_CRX_REGOFFSET_POS)
5851 + ((AWDy & ADC_AWD_CR12_REGOFFSETGAP_MASK) * ADC_AWD_CR12_REGOFFSETGAP_VAL));
5854 (AWDy & ADC_AWD_CR_ALL_CHANNEL_MASK),
5855 AWDChannelGroup & AWDy);
5983__STATIC_INLINE uint32_t LL_ADC_GetAnalogWDMonitChannels(
ADC_TypeDef *ADCx, uint32_t AWDy)
5985 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
CFGR, ((AWDy & ADC_AWD_CRX_REGOFFSET_MASK) >> ADC_AWD_CRX_REGOFFSET_POS)
5986 + ((AWDy & ADC_AWD_CR12_REGOFFSETGAP_MASK) * ADC_AWD_CR12_REGOFFSETGAP_VAL));
5988 uint32_t AnalogWDMonitChannels = (READ_BIT(*preg, AWDy) & AWDy & ADC_AWD_CR_ALL_CHANNEL_MASK);
5994 if (AnalogWDMonitChannels != 0UL)
5996 if (AWDy == LL_ADC_AWD1)
6001 AnalogWDMonitChannels = ((AnalogWDMonitChannels
6002 | (ADC_AWD_CR23_CHANNEL_MASK)
6010 AnalogWDMonitChannels = (AnalogWDMonitChannels
6017 if ((AnalogWDMonitChannels & ADC_AWD_CR23_CHANNEL_MASK) == ADC_AWD_CR23_CHANNEL_MASK)
6020 AnalogWDMonitChannels = (ADC_AWD_CR23_CHANNEL_MASK
6028 AnalogWDMonitChannels = (AnalogWDMonitChannels
6030 | (__LL_ADC_CHANNEL_TO_DECIMAL_NB(AnalogWDMonitChannels) << ADC_CFGR_AWD1CH_Pos)
6036 return AnalogWDMonitChannels;
6092__STATIC_INLINE
void LL_ADC_SetAnalogWDThresholds(
ADC_TypeDef *ADCx, uint32_t AWDy, uint32_t AWDThresholdsHighLow, uint32_t AWDThresholdValue)
6094#if defined(ADC_VER_V5_V90)
6102 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
LTR1_TR1, ((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS));
6105 (
ADC3_TR1_LT1 << (AWDThresholdsHighLow * ADC3_TR1_HT1_Pos)),
6106 AWDThresholdValue << (((AWDThresholdsHighLow *
ADC3_TR1_HT1) & ADC_AWD_TRX_BIT_HIGH_MASK) >> ADC_AWD_TRX_BIT_HIGH_SHIFT4));
6115 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
LTR1_TR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL)
6116 + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL)
6117 + (AWDThresholdsHighLow));
6119 MODIFY_REG(*preg,
ADC_LTR_LT, AWDThresholdValue);
6127 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
LTR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL)
6128 + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL)
6129 + (AWDThresholdsHighLow));
6131 MODIFY_REG(*preg,
ADC_LTR_LT, AWDThresholdValue);
6158__STATIC_INLINE uint32_t LL_ADC_GetAnalogWDThresholds(
ADC_TypeDef *ADCx, uint32_t AWDy, uint32_t AWDThresholdsHighLow)
6160#if defined(ADC_VER_V5_V90)
6163 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
LTR1_TR1,
6164 ((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS));
6166 return (uint32_t)(READ_BIT(*preg,
6167 (
ADC3_TR1_LT1 << (AWDThresholdsHighLow * ADC3_TR1_HT1_Pos)))
6168 >> (((AWDThresholdsHighLow & ADC_AWD_TRX_BIT_HIGH_MASK) >> ADC_AWD_TRX_BIT_HIGH_SHIFT4)
6173 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
LTR1_TR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL)
6174 + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL)
6175 + (AWDThresholdsHighLow));
6177 return (uint32_t)(READ_BIT(*preg,
ADC_LTR_LT));
6180 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
LTR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL)
6181 + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL)
6182 + (AWDThresholdsHighLow));
6184 return (uint32_t)(READ_BIT(*preg,
ADC_LTR_LT));
6188#if defined(ADC_VER_V5_V90)
6234__STATIC_INLINE
void LL_ADC_ConfigAnalogWDThresholds(
ADC_TypeDef *ADCx, uint32_t AWDy, uint32_t AWDThresholdHighValue, uint32_t AWDThresholdLowValue)
6243 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
LTR1_TR1,
6244 ((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS));
6248 (AWDThresholdHighValue << ADC3_TR1_HT1_Pos) | AWDThresholdLowValue);
6252 __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
LTR1_TR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL)
6253 + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL)
6254 + (LL_ADC_AWD_THRESHOLD_LOW));
6255 __IO uint32_t *preg2 = __ADC_PTR_REG_OFFSET(ADCx->
LTR1_TR1, (((AWDy & ADC_AWD_TRX_REGOFFSET_MASK) >> ADC_AWD_TRX_REGOFFSET_POS) * 2UL)
6256 + ((AWDy & ADC_AWD_TR12_REGOFFSETGAP_MASK) * ADC_AWD_TR12_REGOFFSETGAP_VAL)
6257 + (LL_ADC_AWD_THRESHOLD_HIGH));
6259 MODIFY_REG(*preg,
ADC_LTR_LT, AWDThresholdLowValue);
6260 MODIFY_REG(*preg2,
ADC_HTR_HT, AWDThresholdHighValue);
6289__STATIC_INLINE
void LL_ADC_SetAWDFilteringConfiguration(
ADC_TypeDef *ADCx, uint32_t AWDy, uint32_t FilteringConfig)
6318__STATIC_INLINE uint32_t LL_ADC_GetAWDFilteringConfiguration(
ADC_TypeDef *ADCx, uint32_t AWDy)
6367__STATIC_INLINE
void LL_ADC_SetOverSamplingScope(
ADC_TypeDef *ADCx, uint32_t OvsScope)
6392__STATIC_INLINE uint32_t LL_ADC_GetOverSamplingScope(
ADC_TypeDef *ADCx)
6419__STATIC_INLINE
void LL_ADC_SetOverSamplingDiscont(
ADC_TypeDef *ADCx, uint32_t OverSamplingDiscont)
6438__STATIC_INLINE uint32_t LL_ADC_GetOverSamplingDiscont(
ADC_TypeDef *ADCx)
6481__STATIC_INLINE
void LL_ADC_ConfigOverSamplingRatioShift(
ADC_TypeDef *ADCx, uint32_t Ratio, uint32_t Shift)
6483#if defined(ADC_VER_V5_V90)
6515__STATIC_INLINE uint32_t LL_ADC_GetOverSamplingRatio(
ADC_TypeDef *ADCx)
6517#if defined(ADC_VER_V5_V90)
6524 return (((uint32_t)(READ_BIT(ADCx->
CFGR2,
ADC_CFGR2_OVSR)) + (1UL << ADC_CFGR2_OVSR_Pos)) >> ADC_CFGR2_OVSR_Pos);
6528 return (((uint32_t)(READ_BIT(ADCx->
CFGR2,
ADC_CFGR2_OVSR)) + (1UL << ADC_CFGR2_OVSR_Pos)) >> ADC_CFGR2_OVSR_Pos);
6552__STATIC_INLINE uint32_t LL_ADC_GetOverSamplingShift(
ADC_TypeDef *ADCx)
6581__STATIC_INLINE
void LL_ADC_SetBoostMode(
ADC_TypeDef *ADCx, uint32_t BoostMode)
6583#if defined(ADC_VER_V5_V90)
6589 if ((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL)
6611__STATIC_INLINE uint32_t LL_ADC_GetBoostMode(
ADC_TypeDef *ADCx)
6613 if ((DBGMCU->IDCODE & 0x30000000UL) == 0x10000000UL)
6649__STATIC_INLINE
void LL_ADC_SetMultimode(
ADC_Common_TypeDef *ADCxy_COMMON, uint32_t Multimode)
6721__STATIC_INLINE
void LL_ADC_SetMultiDMATransfer(
ADC_Common_TypeDef *ADCxy_COMMON, uint32_t MultiDMATransfer)
6809__STATIC_INLINE
void LL_ADC_SetMultiTwoSamplingDelay(
ADC_Common_TypeDef *ADCxy_COMMON, uint32_t MultiTwoSamplingDelay)
6842__STATIC_INLINE uint32_t LL_ADC_GetMultiTwoSamplingDelay(
ADC_Common_TypeDef *ADCxy_COMMON)
6868__STATIC_INLINE
void LL_ADC_EnableDeepPowerDown(
ADC_TypeDef *ADCx)
6873 MODIFY_REG(ADCx->
CR,
6874 ADC_CR_BITS_PROPERTY_RS,
6891__STATIC_INLINE
void LL_ADC_DisableDeepPowerDown(
ADC_TypeDef *ADCx)
6905__STATIC_INLINE uint32_t LL_ADC_IsDeepPowerDownEnabled(
ADC_TypeDef *ADCx)
6924__STATIC_INLINE
void LL_ADC_EnableInternalRegulator(
ADC_TypeDef *ADCx)
6929 MODIFY_REG(ADCx->
CR,
6930 ADC_CR_BITS_PROPERTY_RS,
6943__STATIC_INLINE
void LL_ADC_DisableInternalRegulator(
ADC_TypeDef *ADCx)
6954__STATIC_INLINE uint32_t LL_ADC_IsInternalRegulatorEnabled(
ADC_TypeDef *ADCx)
6975__STATIC_INLINE
void LL_ADC_Enable(
ADC_TypeDef *ADCx)
6980 MODIFY_REG(ADCx->
CR,
6981 ADC_CR_BITS_PROPERTY_RS,
6995__STATIC_INLINE
void LL_ADC_Disable(
ADC_TypeDef *ADCx)
7000 MODIFY_REG(ADCx->
CR,
7001 ADC_CR_BITS_PROPERTY_RS,
7014__STATIC_INLINE uint32_t LL_ADC_IsEnabled(
ADC_TypeDef *ADCx)
7025__STATIC_INLINE uint32_t LL_ADC_IsDisableOngoing(
ADC_TypeDef *ADCx)
7063__STATIC_INLINE
void LL_ADC_StartCalibration(
ADC_TypeDef *ADCx, uint32_t CalibrationMode, uint32_t SingleDiff)
7068 MODIFY_REG(ADCx->
CR,
7070 ADC_CR_ADCAL | (CalibrationMode & ADC_CALIB_MODE_MASK) | (SingleDiff & ADC_SINGLEDIFF_CALIB_START_MASK));
7079__STATIC_INLINE uint32_t LL_ADC_IsCalibrationOnGoing(
ADC_TypeDef *ADCx)
7111__STATIC_INLINE
void LL_ADC_REG_StartConversion(
ADC_TypeDef *ADCx)
7116 MODIFY_REG(ADCx->
CR,
7117 ADC_CR_BITS_PROPERTY_RS,
7131__STATIC_INLINE
void LL_ADC_REG_StopConversion(
ADC_TypeDef *ADCx)
7136 MODIFY_REG(ADCx->
CR,
7137 ADC_CR_BITS_PROPERTY_RS,
7147__STATIC_INLINE uint32_t LL_ADC_REG_IsConversionOngoing(
ADC_TypeDef *ADCx)
7158__STATIC_INLINE uint32_t LL_ADC_REG_IsStopConversionOngoing(
ADC_TypeDef *ADCx)
7172__STATIC_INLINE uint32_t LL_ADC_REG_ReadConversionData32(
ADC_TypeDef *ADCx)
7187__STATIC_INLINE uint16_t LL_ADC_REG_ReadConversionData16(
ADC_TypeDef *ADCx)
7202__STATIC_INLINE uint16_t LL_ADC_REG_ReadConversionData14(
ADC_TypeDef *ADCx)
7217__STATIC_INLINE uint16_t LL_ADC_REG_ReadConversionData12(
ADC_TypeDef *ADCx)
7232__STATIC_INLINE uint16_t LL_ADC_REG_ReadConversionData10(
ADC_TypeDef *ADCx)
7247__STATIC_INLINE uint8_t LL_ADC_REG_ReadConversionData8(
ADC_TypeDef *ADCx)
7272__STATIC_INLINE uint32_t LL_ADC_REG_ReadMultiConversionData32(
ADC_Common_TypeDef *ADCxy_COMMON, uint32_t ConversionData)
7274 return (uint32_t)(READ_BIT(ADCxy_COMMON->
CDR,
7276 >> (POSITION_VAL(ConversionData) & 0x1FUL)
7307__STATIC_INLINE
void LL_ADC_INJ_StartConversion(
ADC_TypeDef *ADCx)
7312 MODIFY_REG(ADCx->
CR,
7313 ADC_CR_BITS_PROPERTY_RS,
7327__STATIC_INLINE
void LL_ADC_INJ_StopConversion(
ADC_TypeDef *ADCx)
7332 MODIFY_REG(ADCx->
CR,
7333 ADC_CR_BITS_PROPERTY_RS,
7343__STATIC_INLINE uint32_t LL_ADC_INJ_IsConversionOngoing(
ADC_TypeDef *ADCx)
7354__STATIC_INLINE uint32_t LL_ADC_INJ_IsStopConversionOngoing(
ADC_TypeDef *ADCx)
7376__STATIC_INLINE uint32_t LL_ADC_INJ_ReadConversionData32(
ADC_TypeDef *ADCx, uint32_t Rank)
7378 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS));
7380 return (uint32_t)(READ_BIT(*preg,
7403__STATIC_INLINE uint16_t LL_ADC_INJ_ReadConversionData16(
ADC_TypeDef *ADCx, uint32_t Rank)
7405 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS));
7407 return (uint16_t)(READ_BIT(*preg,
7430__STATIC_INLINE uint16_t LL_ADC_INJ_ReadConversionData14(
ADC_TypeDef *ADCx, uint32_t Rank)
7432 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS));
7434 return (uint16_t)(READ_BIT(*preg,
7457__STATIC_INLINE uint16_t LL_ADC_INJ_ReadConversionData12(
ADC_TypeDef *ADCx, uint32_t Rank)
7459 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS));
7461 return (uint16_t)(READ_BIT(*preg,
7484__STATIC_INLINE uint16_t LL_ADC_INJ_ReadConversionData10(
ADC_TypeDef *ADCx, uint32_t Rank)
7486 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS));
7488 return (uint16_t)(READ_BIT(*preg,
7511__STATIC_INLINE uint8_t LL_ADC_INJ_ReadConversionData8(
ADC_TypeDef *ADCx, uint32_t Rank)
7513 const __IO uint32_t *preg = __ADC_PTR_REG_OFFSET(ADCx->
JDR1, ((Rank & ADC_INJ_JDRX_REGOFFSET_MASK) >> ADC_JDRX_REGOFFSET_POS));
7515 return (uint8_t)(READ_BIT(*preg,
7538__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_ADRDY(
ADC_TypeDef *ADCx)
7540 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_ADRDY) == (LL_ADC_FLAG_ADRDY)) ? 1UL : 0UL);
7549__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_EOC(
ADC_TypeDef *ADCx)
7560__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_EOS(
ADC_TypeDef *ADCx)
7562 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_EOS) == (LL_ADC_FLAG_EOS)) ? 1UL : 0UL);
7571__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_OVR(
ADC_TypeDef *ADCx)
7573 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_OVR) == (LL_ADC_FLAG_OVR)) ? 1UL : 0UL);
7582__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_EOSMP(
ADC_TypeDef *ADCx)
7584 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_EOSMP) == (LL_ADC_FLAG_EOSMP)) ? 1UL : 0UL);
7593__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_JEOC(
ADC_TypeDef *ADCx)
7595 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_JEOC) == (LL_ADC_FLAG_JEOC)) ? 1UL : 0UL);
7604__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_JEOS(
ADC_TypeDef *ADCx)
7606 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_JEOS) == (LL_ADC_FLAG_JEOS)) ? 1UL : 0UL);
7615__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_JQOVF(
ADC_TypeDef *ADCx)
7617 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_JQOVF) == (LL_ADC_FLAG_JQOVF)) ? 1UL : 0UL);
7626__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_LDORDY(
ADC_TypeDef *ADCx)
7628 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_LDORDY) == (LL_ADC_FLAG_LDORDY)) ? 1UL : 0UL);
7637__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_AWD1(
ADC_TypeDef *ADCx)
7639 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_AWD1) == (LL_ADC_FLAG_AWD1)) ? 1UL : 0UL);
7648__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_AWD2(
ADC_TypeDef *ADCx)
7650 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_AWD2) == (LL_ADC_FLAG_AWD2)) ? 1UL : 0UL);
7659__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_AWD3(
ADC_TypeDef *ADCx)
7661 return ((READ_BIT(ADCx->
ISR, LL_ADC_FLAG_AWD3) == (LL_ADC_FLAG_AWD3)) ? 1UL : 0UL);
7673__STATIC_INLINE
void LL_ADC_ClearFlag_ADRDY(
ADC_TypeDef *ADCx)
7675 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_ADRDY);
7684__STATIC_INLINE
void LL_ADC_ClearFlag_EOC(
ADC_TypeDef *ADCx)
7686 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_EOC);
7695__STATIC_INLINE
void LL_ADC_ClearFlag_EOS(
ADC_TypeDef *ADCx)
7697 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_EOS);
7706__STATIC_INLINE
void LL_ADC_ClearFlag_OVR(
ADC_TypeDef *ADCx)
7708 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_OVR);
7717__STATIC_INLINE
void LL_ADC_ClearFlag_EOSMP(
ADC_TypeDef *ADCx)
7719 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_EOSMP);
7728__STATIC_INLINE
void LL_ADC_ClearFlag_JEOC(
ADC_TypeDef *ADCx)
7730 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_JEOC);
7739__STATIC_INLINE
void LL_ADC_ClearFlag_JEOS(
ADC_TypeDef *ADCx)
7741 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_JEOS);
7750__STATIC_INLINE
void LL_ADC_ClearFlag_JQOVF(
ADC_TypeDef *ADCx)
7752 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_JQOVF);
7761__STATIC_INLINE
void LL_ADC_ClearFlag_AWD1(
ADC_TypeDef *ADCx)
7763 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_AWD1);
7772__STATIC_INLINE
void LL_ADC_ClearFlag_AWD2(
ADC_TypeDef *ADCx)
7774 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_AWD2);
7783__STATIC_INLINE
void LL_ADC_ClearFlag_AWD3(
ADC_TypeDef *ADCx)
7785 WRITE_REG(ADCx->
ISR, LL_ADC_FLAG_AWD3);
7795__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_ADRDY(
ADC_Common_TypeDef *ADCxy_COMMON)
7797 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_ADRDY_MST) == (LL_ADC_FLAG_ADRDY_MST)) ? 1UL : 0UL);
7807__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_ADRDY(
ADC_Common_TypeDef *ADCxy_COMMON)
7809 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_ADRDY_SLV) == (LL_ADC_FLAG_ADRDY_SLV)) ? 1UL : 0UL);
7819__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_EOC(
ADC_Common_TypeDef *ADCxy_COMMON)
7821 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_EOC_SLV) == (LL_ADC_FLAG_EOC_SLV)) ? 1UL : 0UL);
7831__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_EOC(
ADC_Common_TypeDef *ADCxy_COMMON)
7833 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_EOC_SLV) == (LL_ADC_FLAG_EOC_SLV)) ? 1UL : 0UL);
7843__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_EOS(
ADC_Common_TypeDef *ADCxy_COMMON)
7845 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_EOS_MST) == (LL_ADC_FLAG_EOS_MST)) ? 1UL : 0UL);
7855__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_EOS(
ADC_Common_TypeDef *ADCxy_COMMON)
7857 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_EOS_SLV) == (LL_ADC_FLAG_EOS_SLV)) ? 1UL : 0UL);
7867__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_OVR(
ADC_Common_TypeDef *ADCxy_COMMON)
7869 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_OVR_MST) == (LL_ADC_FLAG_OVR_MST)) ? 1UL : 0UL);
7879__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_OVR(
ADC_Common_TypeDef *ADCxy_COMMON)
7881 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_OVR_SLV) == (LL_ADC_FLAG_OVR_SLV)) ? 1UL : 0UL);
7891__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_EOSMP(
ADC_Common_TypeDef *ADCxy_COMMON)
7893 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_EOSMP_MST) == (LL_ADC_FLAG_EOSMP_MST)) ? 1UL : 0UL);
7903__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_EOSMP(
ADC_Common_TypeDef *ADCxy_COMMON)
7905 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_EOSMP_SLV) == (LL_ADC_FLAG_EOSMP_SLV)) ? 1UL : 0UL);
7915__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_JEOC(
ADC_Common_TypeDef *ADCxy_COMMON)
7917 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_JEOC_MST) == (LL_ADC_FLAG_JEOC_MST)) ? 1UL : 0UL);
7927__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_JEOC(
ADC_Common_TypeDef *ADCxy_COMMON)
7929 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_JEOC_SLV) == (LL_ADC_FLAG_JEOC_SLV)) ? 1UL : 0UL);
7939__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_JEOS(
ADC_Common_TypeDef *ADCxy_COMMON)
7941 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_JEOS_MST) == (LL_ADC_FLAG_JEOS_MST)) ? 1UL : 0UL);
7951__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_JEOS(
ADC_Common_TypeDef *ADCxy_COMMON)
7953 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_JEOS_SLV) == (LL_ADC_FLAG_JEOS_SLV)) ? 1UL : 0UL);
7963__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_JQOVF(
ADC_Common_TypeDef *ADCxy_COMMON)
7965 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_JQOVF_MST) == (LL_ADC_FLAG_JQOVF_MST)) ? 1UL : 0UL);
7975__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_JQOVF(
ADC_Common_TypeDef *ADCxy_COMMON)
7977 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_JQOVF_SLV) == (LL_ADC_FLAG_JQOVF_SLV)) ? 1UL : 0UL);
7987__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_AWD1(
ADC_Common_TypeDef *ADCxy_COMMON)
7989 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_AWD1_MST) == (LL_ADC_FLAG_AWD1_MST)) ? 1UL : 0UL);
7999__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_AWD1(
ADC_Common_TypeDef *ADCxy_COMMON)
8001 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_AWD1_SLV) == (LL_ADC_FLAG_AWD1_SLV)) ? 1UL : 0UL);
8011__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_AWD2(
ADC_Common_TypeDef *ADCxy_COMMON)
8013 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_AWD2_MST) == (LL_ADC_FLAG_AWD2_MST)) ? 1UL : 0UL);
8023__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_AWD2(
ADC_Common_TypeDef *ADCxy_COMMON)
8025 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_AWD2_SLV) == (LL_ADC_FLAG_AWD2_SLV)) ? 1UL : 0UL);
8035__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_MST_AWD3(
ADC_Common_TypeDef *ADCxy_COMMON)
8037 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_AWD3_MST) == (LL_ADC_FLAG_AWD3_MST)) ? 1UL : 0UL);
8047__STATIC_INLINE uint32_t LL_ADC_IsActiveFlag_SLV_AWD3(
ADC_Common_TypeDef *ADCxy_COMMON)
8049 return ((READ_BIT(ADCxy_COMMON->
CSR, LL_ADC_FLAG_AWD3_SLV) == (LL_ADC_FLAG_AWD3_SLV)) ? 1UL : 0UL);
8067__STATIC_INLINE
void LL_ADC_EnableIT_ADRDY(
ADC_TypeDef *ADCx)
8069 SET_BIT(ADCx->
IER, LL_ADC_IT_ADRDY);
8078__STATIC_INLINE
void LL_ADC_EnableIT_EOC(
ADC_TypeDef *ADCx)
8080 SET_BIT(ADCx->
IER, LL_ADC_IT_EOC);
8089__STATIC_INLINE
void LL_ADC_EnableIT_EOS(
ADC_TypeDef *ADCx)
8091 SET_BIT(ADCx->
IER, LL_ADC_IT_EOS);
8100__STATIC_INLINE
void LL_ADC_EnableIT_OVR(
ADC_TypeDef *ADCx)
8102 SET_BIT(ADCx->
IER, LL_ADC_IT_OVR);
8111__STATIC_INLINE
void LL_ADC_EnableIT_EOSMP(
ADC_TypeDef *ADCx)
8113 SET_BIT(ADCx->
IER, LL_ADC_IT_EOSMP);
8122__STATIC_INLINE
void LL_ADC_EnableIT_JEOC(
ADC_TypeDef *ADCx)
8124 SET_BIT(ADCx->
IER, LL_ADC_IT_JEOC);
8133__STATIC_INLINE
void LL_ADC_EnableIT_JEOS(
ADC_TypeDef *ADCx)
8135 SET_BIT(ADCx->
IER, LL_ADC_IT_JEOS);
8144__STATIC_INLINE
void LL_ADC_EnableIT_JQOVF(
ADC_TypeDef *ADCx)
8146 SET_BIT(ADCx->
IER, LL_ADC_IT_JQOVF);
8155__STATIC_INLINE
void LL_ADC_EnableIT_AWD1(
ADC_TypeDef *ADCx)
8157 SET_BIT(ADCx->
IER, LL_ADC_IT_AWD1);
8166__STATIC_INLINE
void LL_ADC_EnableIT_AWD2(
ADC_TypeDef *ADCx)
8168 SET_BIT(ADCx->
IER, LL_ADC_IT_AWD2);
8177__STATIC_INLINE
void LL_ADC_EnableIT_AWD3(
ADC_TypeDef *ADCx)
8179 SET_BIT(ADCx->
IER, LL_ADC_IT_AWD3);
8188__STATIC_INLINE
void LL_ADC_DisableIT_ADRDY(
ADC_TypeDef *ADCx)
8190 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_ADRDY);
8199__STATIC_INLINE
void LL_ADC_DisableIT_EOC(
ADC_TypeDef *ADCx)
8201 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_EOC);
8210__STATIC_INLINE
void LL_ADC_DisableIT_EOS(
ADC_TypeDef *ADCx)
8212 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_EOS);
8221__STATIC_INLINE
void LL_ADC_DisableIT_OVR(
ADC_TypeDef *ADCx)
8223 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_OVR);
8232__STATIC_INLINE
void LL_ADC_DisableIT_EOSMP(
ADC_TypeDef *ADCx)
8234 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_EOSMP);
8243__STATIC_INLINE
void LL_ADC_DisableIT_JEOC(
ADC_TypeDef *ADCx)
8245 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_JEOC);
8254__STATIC_INLINE
void LL_ADC_DisableIT_JEOS(
ADC_TypeDef *ADCx)
8256 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_JEOS);
8265__STATIC_INLINE
void LL_ADC_DisableIT_JQOVF(
ADC_TypeDef *ADCx)
8267 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_JQOVF);
8276__STATIC_INLINE
void LL_ADC_DisableIT_AWD1(
ADC_TypeDef *ADCx)
8278 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_AWD1);
8287__STATIC_INLINE
void LL_ADC_DisableIT_AWD2(
ADC_TypeDef *ADCx)
8289 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_AWD2);
8298__STATIC_INLINE
void LL_ADC_DisableIT_AWD3(
ADC_TypeDef *ADCx)
8300 CLEAR_BIT(ADCx->
IER, LL_ADC_IT_AWD3);
8310__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_ADRDY(
ADC_TypeDef *ADCx)
8312 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_ADRDY) == (LL_ADC_IT_ADRDY)) ? 1UL : 0UL);
8322__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_EOC(
ADC_TypeDef *ADCx)
8324 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_EOC) == (LL_ADC_IT_EOC)) ? 1UL : 0UL);
8334__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_EOS(
ADC_TypeDef *ADCx)
8336 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_EOS) == (LL_ADC_IT_EOS)) ? 1UL : 0UL);
8346__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_OVR(
ADC_TypeDef *ADCx)
8348 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_OVR) == (LL_ADC_IT_OVR)) ? 1UL : 0UL);
8358__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_EOSMP(
ADC_TypeDef *ADCx)
8360 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_EOSMP) == (LL_ADC_IT_EOSMP)) ? 1UL : 0UL);
8370__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_JEOC(
ADC_TypeDef *ADCx)
8372 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_JEOC) == (LL_ADC_IT_JEOC)) ? 1UL : 0UL);
8382__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_JEOS(
ADC_TypeDef *ADCx)
8384 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_JEOS) == (LL_ADC_IT_JEOS)) ? 1UL : 0UL);
8394__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_JQOVF(
ADC_TypeDef *ADCx)
8396 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_JQOVF) == (LL_ADC_IT_JQOVF)) ? 1UL : 0UL);
8406__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_AWD1(
ADC_TypeDef *ADCx)
8408 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_AWD1) == (LL_ADC_IT_AWD1)) ? 1UL : 0UL);
8418__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_AWD2(
ADC_TypeDef *ADCx)
8420 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_AWD2) == (LL_ADC_IT_AWD2)) ? 1UL : 0UL);
8430__STATIC_INLINE uint32_t LL_ADC_IsEnabledIT_AWD3(
ADC_TypeDef *ADCx)
8432 return ((READ_BIT(ADCx->
IER, LL_ADC_IT_AWD3) == (LL_ADC_IT_AWD3)) ? 1UL : 0UL);
8439#if defined(USE_FULL_LL_DRIVER) || defined(__rtems__)
8447ErrorStatus LL_ADC_CommonInit(
ADC_Common_TypeDef *ADCxy_COMMON, LL_ADC_CommonInitTypeDef *ADC_CommonInitStruct);
8448void LL_ADC_CommonStructInit(LL_ADC_CommonInitTypeDef *ADC_CommonInitStruct);
8455ErrorStatus LL_ADC_Init(
ADC_TypeDef *ADCx, LL_ADC_InitTypeDef *ADC_InitStruct);
8456void LL_ADC_StructInit(LL_ADC_InitTypeDef *ADC_InitStruct);
8459ErrorStatus LL_ADC_REG_Init(
ADC_TypeDef *ADCx, LL_ADC_REG_InitTypeDef *ADC_REG_InitStruct);
8460void LL_ADC_REG_StructInit(LL_ADC_REG_InitTypeDef *ADC_REG_InitStruct);
8463ErrorStatus LL_ADC_INJ_Init(
ADC_TypeDef *ADCx, LL_ADC_INJ_InitTypeDef *ADC_INJ_InitStruct);
8464void 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:4086
#define ADC_CALFACT_CALFACT_S
Definition: stm32h723xx.h:3928
#define ADC_CCR_PRESC
Definition: stm32h723xx.h:4092
#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:3958
#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:3903
#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:4071
#define ADC_CCR_DAMDF
Definition: stm32h723xx.h:4080
#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:4106
#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:4062
#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:4103
#define ADC_CCR_VREFEN
Definition: stm32h723xx.h:4100
#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:249
__IO uint32_t CALFACT
Definition: stm32h742xx.h:281
__IO uint32_t DIFSEL
Definition: stm32h742xx.h:280
__IO uint32_t SMPR1
Definition: stm32h723xx.h:248
__IO uint32_t IER
Definition: stm32h723xx.h:244
__IO uint32_t CALFACT2
Definition: stm32h742xx.h:282
__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:248
__IO uint32_t LTR1_TR1
Definition: stm32h723xx.h:251