Skip to content

Commit b96e448

Browse files
committed
[LL][ADC] Fix issue in function LL_ADC_GetChannelSamplingTime() when multiple channels configured and get config of lowest channel nb
1 parent a8515e2 commit b96e448

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Inc/stm32c0xx_ll_adc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3924,7 +3924,7 @@ __STATIC_INLINE uint32_t LL_ADC_GetChannelSamplingTime(const ADC_TypeDef *ADCx,
39243924
uint32_t smp_channel_posbit0 = ((smpr & ADC_SAMPLING_TIME_CH_MASK)
39253925
>> ((((Channel & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS)
39263926
+ ADC_SMPR_SMPSEL0_BITOFFSET_POS)
3927-
& 0x1FUL));
3927+
& 0x1FUL)) & 0x01UL;
39283928

39293929
/* Select sampling time bitfield depending on sampling time bit value 0 or 1. */
39303930
return ((~(smp_channel_posbit0) * LL_ADC_SAMPLINGTIME_COMMON_1)

0 commit comments

Comments
 (0)