@@ -860,7 +860,7 @@ uint16_t adc_read_value(PinName pin, uint32_t resolution)
860
860
#if !defined(STM32F1xx) && !defined(STM32F2xx) && !defined(STM32F3xx) && \
861
861
!defined (STM32F4xx) && !defined (STM32F7xx) && !defined (STM32G4xx) && \
862
862
!defined (STM32H7xx) && !defined (STM32L4xx) && !defined (STM32L5xx) && \
863
- !defined (STM32MP1xx) && !defined (STM32WBxx)
863
+ !defined (STM32MP1xx) && !defined (STM32WBxx) || defined (ADC_SUPPORT_2_5_MSPS)
864
864
AdcHandle.Init .LowPowerAutoPowerOff = DISABLE; /* ADC automatically powers-off after a conversion and automatically wakes-up when a new conversion is triggered */
865
865
#endif
866
866
#ifdef ADC_CHANNELS_BANK_B
@@ -874,7 +874,7 @@ uint16_t adc_read_value(PinName pin, uint32_t resolution)
874
874
#endif
875
875
AdcHandle.Init .DiscontinuousConvMode = DISABLE; /* Parameter discarded because sequencer is disabled */
876
876
#if !defined(STM32F0xx) && !defined(STM32G0xx) && !defined(STM32L0xx) && \
877
- !defined (STM32WLxx)
877
+ !defined (STM32WLxx) && ! defined (ADC_SUPPORT_2_5_MSPS)
878
878
AdcHandle.Init .NbrOfDiscConversion = 0 ; /* Parameter discarded because sequencer is disabled */
879
879
#endif
880
880
AdcHandle.Init .ExternalTrigConv = ADC_SOFTWARE_START; /* Software start to trig the 1st conversion manually, without external event */
@@ -898,7 +898,8 @@ uint16_t adc_read_value(PinName pin, uint32_t resolution)
898
898
#if defined(STM32F0xx)
899
899
AdcHandle.Init .SamplingTimeCommon = samplingTime;
900
900
#endif
901
- #if defined(STM32G0xx) || defined(STM32U5xx) || defined(STM32WLxx)
901
+ #if defined(STM32G0xx) || defined(STM32U5xx) || defined(STM32WLxx) || \
902
+ defined (ADC_SUPPORT_2_5_MSPS)
902
903
AdcHandle.Init .SamplingTimeCommon1 = samplingTime; /* Set sampling time common to a group of channels. */
903
904
AdcHandle.Init .SamplingTimeCommon2 = samplingTime; /* Set sampling time common to a group of channels, second common setting possible.*/
904
905
#endif
@@ -908,7 +909,7 @@ uint16_t adc_read_value(PinName pin, uint32_t resolution)
908
909
#endif
909
910
#if !defined(STM32F0xx) && !defined(STM32F1xx) && !defined(STM32F2xx) && \
910
911
!defined (STM32F3xx) && !defined (STM32F4xx) && !defined (STM32F7xx) && \
911
- !defined (STM32L1xx)
912
+ !defined (STM32L1xx) && ! defined (ADC_SUPPORT_2_5_MSPS)
912
913
AdcHandle.Init .OversamplingMode = DISABLE;
913
914
/* AdcHandle.Init.Oversample ignore for STM32L0xx as oversampling disabled */
914
915
/* AdcHandle.Init.Oversampling ignored for other as oversampling disabled */
0 commit comments