stm32/adc: Fix sampling for internal channels on H7 MCUs.

Set to 810 cycles following HAL examples.
This commit is contained in:
iabdalkader 2019-10-11 22:38:50 +02:00 committed by Damien George
parent 4cee42d864
commit 6e4468a2ab
1 changed files with 1 additions and 1 deletions

View File

@ -330,7 +330,7 @@ STATIC void adc_config_channel(ADC_HandleTypeDef *adc_handle, uint32_t channel)
sConfig.SamplingTime = ADC_SAMPLETIME_15CYCLES;
#elif defined(STM32H7)
if (__HAL_ADC_IS_CHANNEL_INTERNAL(channel)) {
sConfig.SamplingTime = ADC_SAMPLETIME_387CYCLES_5;
sConfig.SamplingTime = ADC_SAMPLETIME_810CYCLES_5;
} else {
sConfig.SamplingTime = ADC_SAMPLETIME_8CYCLES_5;
}