summaryrefslogtreecommitdiff
path: root/ports/stm32/adc.c
diff options
context:
space:
mode:
authorRene Straub <rene@see5.ch>2023-08-05 14:23:29 +0200
committerDamien George <damien@micropython.org>2023-09-27 16:28:31 +1000
commit64d24fccd6d5469c38ea4440cd43a03aec750835 (patch)
tree307b09b6495973371f2ebb9eaa86bed6fb339890 /ports/stm32/adc.c
parent8f9bba0a1a36caf3afd86b27b1e860225f85cc6a (diff)
stm32/adc: Optimize sampling time for G4, H5, L4 and WB MCUs.
Signed-off-by: Rene Straub <rene@see5.ch>
Diffstat (limited to 'ports/stm32/adc.c')
-rw-r--r--ports/stm32/adc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/stm32/adc.c b/ports/stm32/adc.c
index d153f547d..6bd0f4ce2 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;