drivers: adc: stm32: do not disable adc after measurement
Do not disable the ADC after the end of the measurement to avoid systematic enabling which is time-consuming in case the configuration is unchanged. Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
This commit is contained in:
parent
548fb97142
commit
62f1105550
1 changed files with 2 additions and 2 deletions
|
@ -1086,8 +1086,6 @@ static void adc_context_on_complete(struct adc_context *ctx, int status)
|
||||||
|
|
||||||
ARG_UNUSED(status);
|
ARG_UNUSED(status);
|
||||||
|
|
||||||
adc_stm32_disable(adc);
|
|
||||||
|
|
||||||
/* Reset acquisition time used for the sequence */
|
/* Reset acquisition time used for the sequence */
|
||||||
data->acq_time_index[0] = -1;
|
data->acq_time_index[0] = -1;
|
||||||
data->acq_time_index[1] = -1;
|
data->acq_time_index[1] = -1;
|
||||||
|
@ -1095,6 +1093,8 @@ static void adc_context_on_complete(struct adc_context *ctx, int status)
|
||||||
#if defined(CONFIG_SOC_SERIES_STM32H7X) || defined(CONFIG_SOC_SERIES_STM32U5X)
|
#if defined(CONFIG_SOC_SERIES_STM32H7X) || defined(CONFIG_SOC_SERIES_STM32U5X)
|
||||||
/* Reset channel preselection register */
|
/* Reset channel preselection register */
|
||||||
LL_ADC_SetChannelPreselection(adc, 0);
|
LL_ADC_SetChannelPreselection(adc, 0);
|
||||||
|
#else
|
||||||
|
ARG_UNUSED(adc);
|
||||||
#endif /* CONFIG_SOC_SERIES_STM32H7X || CONFIG_SOC_SERIES_STM32U5X */
|
#endif /* CONFIG_SOC_SERIES_STM32H7X || CONFIG_SOC_SERIES_STM32U5X */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue