@@ -33,6 +33,8 @@ static PinName g_current_pin = NC;
33
33
#ifndef ADC_SAMPLINGTIME
34
34
#if defined(ADC_SAMPLETIME_8CYCLES_5)
35
35
#define ADC_SAMPLINGTIME ADC_SAMPLETIME_8CYCLES_5;
36
+ #elif defined(ADC_SAMPLETIME_11CYCLES_5)
37
+ #define ADC_SAMPLINGTIME ADC_SAMPLETIME_11CYCLES_5;
36
38
#elif defined(ADC_SAMPLETIME_12CYCLES)
37
39
#define ADC_SAMPLINGTIME ADC_SAMPLETIME_12CYCLES;
38
40
#elif defined(ADC_SAMPLETIME_12CYCLES_5)
@@ -84,6 +86,8 @@ static PinName g_current_pin = NC;
84
86
#define ADC_SAMPLINGTIME_INTERNAL ADC_SAMPLETIME_160CYCLES_5
85
87
#elif defined(ADC_SAMPLETIME_814CYCLES_5)
86
88
#define ADC_SAMPLINGTIME_INTERNAL ADC_SAMPLETIME_814CYCLES_5
89
+ #elif defined(ADC_SAMPLETIME_1499CYCLES_5)
90
+ #define ADC_SAMPLINGTIME_INTERNAL ADC_SAMPLETIME_1499CYCLES_5
87
91
#else
88
92
#error "ADC sampling time could not be defined for internal channels!"
89
93
#endif
@@ -894,8 +898,8 @@ uint16_t adc_read_value(PinName pin, uint32_t resolution)
894
898
#if !defined(STM32F1xx) && !defined(STM32F2xx) && !defined(STM32F3xx) && \
895
899
!defined (STM32F4xx) && !defined (STM32F7xx) && !defined (STM32G4xx) && \
896
900
!defined (STM32H5xx) && !defined (STM32H7xx) && !defined (STM32L4xx) && \
897
- !defined (STM32L5xx) && !defined (STM32MP1xx) && !defined (STM32WBxx) || \
898
- defined (ADC_SUPPORT_2_5_MSPS)
901
+ !defined (STM32L5xx) && !defined (STM32MP1xx) && !defined (STM32U3xx) && \
902
+ ! defined (STM32WBxx) || defined (ADC_SUPPORT_2_5_MSPS)
899
903
AdcHandle.Init .LowPowerAutoPowerOff = DISABLE; /* ADC automatically powers-off after a conversion and automatically wakes-up when a new conversion is triggered */
900
904
#endif
901
905
#ifdef ADC_CHANNELS_BANK_B
@@ -918,7 +922,7 @@ uint16_t adc_read_value(PinName pin, uint32_t resolution)
918
922
AdcHandle.Init .ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE; /* Parameter discarded because software trigger chosen */
919
923
#endif
920
924
#if !defined(STM32F1xx) && !defined(STM32H7xx) && !defined(STM32MP1xx) && \
921
- !defined (ADC1_V2_5)
925
+ !defined (STM32U3xx) && ! defined ( ADC1_V2_5)
922
926
AdcHandle.Init .DMAContinuousRequests = DISABLE; /* DMA one-shot mode selected (not applied to this example) */
923
927
#endif
924
928
#ifdef ADC_CONVERSIONDATA_DR
@@ -974,7 +978,7 @@ uint16_t adc_read_value(PinName pin, uint32_t resolution)
974
978
AdcChannelConf.Channel = channel; /* Specifies the channel to configure into ADC */
975
979
976
980
#if defined(STM32G4xx) || defined(STM32H5xx) || defined(STM32L4xx) || \
977
- defined (STM32L5xx) || defined (STM32WBxx)
981
+ defined (STM32L5xx) || defined (STM32U3xx) || defined ( STM32WBxx)
978
982
if (!IS_ADC_CHANNEL (&AdcHandle, AdcChannelConf.Channel )) {
979
983
#else
980
984
if (!IS_ADC_CHANNEL (AdcChannelConf.Channel )) {
0 commit comments