Skip to content
Snippets Groups Projects
Commit 6cab8dae authored by Damien George's avatar Damien George
Browse files

stm32/adc: Increase ADC sampling time for internal sources on H7 MCUs.

parent 0555ada2
Branches
No related tags found
No related merge requests found
...@@ -306,7 +306,13 @@ STATIC void adc_config_channel(ADC_HandleTypeDef *adc_handle, uint32_t channel) ...@@ -306,7 +306,13 @@ STATIC void adc_config_channel(ADC_HandleTypeDef *adc_handle, uint32_t channel)
#elif defined(STM32F4) || defined(STM32F7) #elif defined(STM32F4) || defined(STM32F7)
sConfig.SamplingTime = ADC_SAMPLETIME_15CYCLES; sConfig.SamplingTime = ADC_SAMPLETIME_15CYCLES;
#elif defined(STM32H7) #elif defined(STM32H7)
if (channel == ADC_CHANNEL_VREFINT
|| channel == ADC_CHANNEL_TEMPSENSOR
|| channel == ADC_CHANNEL_VBAT) {
sConfig.SamplingTime = ADC_SAMPLETIME_387CYCLES_5;
} else {
sConfig.SamplingTime = ADC_SAMPLETIME_8CYCLES_5; sConfig.SamplingTime = ADC_SAMPLETIME_8CYCLES_5;
}
sConfig.SingleDiff = ADC_SINGLE_ENDED; sConfig.SingleDiff = ADC_SINGLE_ENDED;
sConfig.OffsetNumber = ADC_OFFSET_NONE; sConfig.OffsetNumber = ADC_OFFSET_NONE;
sConfig.OffsetRightShift = DISABLE; sConfig.OffsetRightShift = DISABLE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment