From b9984fd788efc9d61a51d198cb0e4bb4a604d6c3 Mon Sep 17 00:00:00 2001 From: Carsten Keller Date: Sun, 9 Jun 2024 17:57:55 +0200 Subject: [PATCH] =?UTF-8?q?Sample=20time=20expliziet=20setzen=20f=C3=BCpr?= =?UTF-8?q?=20alle=20Kan=C3=A4le?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/ADC.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/ADC.cpp b/Source/ADC.cpp index 80158eb..8165e52 100644 --- a/Source/ADC.cpp +++ b/Source/ADC.cpp @@ -172,10 +172,12 @@ namespace ElektronischeLast /** Configure Regular Channel */ LL_ADC_REG_SetSequencerRanks(ADC1, LL_ADC_REG_RANK_2, LL_ADC_CHANNEL_1); + LL_ADC_SetChannelSamplingTime(ADC1, LL_ADC_CHANNEL_1, LL_ADC_SAMPLINGTIME_COMMON_1); /** Configure Regular Channel */ LL_ADC_REG_SetSequencerRanks(ADC1, LL_ADC_REG_RANK_3, LL_ADC_CHANNEL_6); + LL_ADC_SetChannelSamplingTime(ADC1, LL_ADC_CHANNEL_2, LL_ADC_SAMPLINGTIME_COMMON_1); /* Poll for ADC channel configuration ready */ while (LL_ADC_IsActiveFlag_CCRDY(ADC1) == 0) @@ -183,7 +185,6 @@ namespace ElektronischeLast } /* Clear flag ADC channel configuration ready */ LL_ADC_ClearFlag_CCRDY(ADC1); - LL_ADC_SetChannelSamplingTime(ADC1, LL_ADC_CHANNEL_1, LL_ADC_SAMPLINGTIME_COMMON_1); LL_TIM_InitTypeDef TIM_InitStruct = {