Skip to main content
Visitor
Nov 1, 2026 6:50 AM UTC
Question

STM32CubeF1 V1.8.7: HAL_ADCEx_MultiModeStop_DMA() clears DUALMOD, contradicting its header comment

 The function comment of HAL_ADCEx_MultiModeStop_DMA() states "Multimode is kept enabled after this function" (in stm32f1xx_hal_adc_ex.c, line 792).

However, in the F1 implementation (stm32f1xx_hal_adc_ex.c, line 841) the function actively executes:

CLEAR_BIT(hadc->Instance->CR1, ADC_CR1_DUALMOD);

which is misleading.

So, on STM32F1 the dual ADC mode is silently lost on every stop using HAL_ADCEx_MultiModeStop_DMA(). Users should call HAL_ADCEx_MultiModeConfigChannel() every time before the next start, or the buffer of ADC won’t receive any data on the high 16 bits.

Suggestion: update the F1 header comment to state that DUALMOD is cleared and must be re-configured, or align the F1 implementation with its comment (keep DUALMOD, disable multimode only via HAL_ADC_ReInit).

Happy to provide a minimal reproducer.