From 64d24fccd6d5469c38ea4440cd43a03aec750835 Mon Sep 17 00:00:00 2001 From: Rene Straub Date: Sat, 5 Aug 2023 14:23:29 +0200 Subject: [PATCH] stm32/adc: Optimize sampling time for G4, H5, L4 and WB MCUs. Signed-off-by: Rene Straub --- ports/stm32/adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/stm32/adc.c b/ports/stm32/adc.c index d153f547dd..6bd0f4ce25 100644 --- a/ports/stm32/adc.c +++ b/ports/stm32/adc.c @@ -444,7 +444,7 @@ STATIC void adc_config_channel(ADC_HandleTypeDef *adc_handle, uint32_t channel) if (__HAL_ADC_IS_CHANNEL_INTERNAL(channel)) { sConfig.SamplingTime = ADC_SAMPLETIME_247CYCLES_5; } else { - sConfig.SamplingTime = ADC_SAMPLETIME_12CYCLES_5; + sConfig.SamplingTime = ADC_SAMPLETIME_6CYCLES_5; } sConfig.SingleDiff = ADC_SINGLE_ENDED; sConfig.OffsetNumber = ADC_OFFSET_NONE;