AnsweredAssumed Answered

wrong assert in stm32l0xx_hal_adc.c HAL_ADC_ConfigChannel for multiple channels

Question asked by motylewski.tomasz on Dec 13, 2014
Latest reply on Jan 22, 2015 by Montassar BEN ROMDHANE
STM32CubeMX 4.5.0 generates the following code for multichannel ADC
/**Configure for the selected ADC regular channel to be converted.
*/
sConfig.Channel = ADC_CHANNEL_1|ADC_CHANNEL_6|ADC_CHANNEL_8;
HAL_ADC_ConfigChannel(&hadc, &sConfig);

But HAL_ADC_ConfigChannel stm32l0xx_hal_adc.c V1.1.0 has
assert_param(IS_ADC_CHANNEL(sConfig->Channel));
which crashes because IS_ADC_CHANNEL() checks for a single channel, not a set.

The fix is to comment out this assert_param(). I have not checked whether ADC actually works. Are there any examples of actual conversions using stm32l0xx_hal_adc.c ?

Best regards,
Tomasz Motylewski
K&J Schmittschneider AG

Outcomes