cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX Bug: NbrOfDiscConversion not set

greg2399
Associate
Posted on August 24, 2015 at 22:08

When Discontinuous Conversion Mode is disabled CubeMX leaves the NbrOfDiscConversion field in ADC_InitTypeDef uninitialized which can cause assert_param(IS_ADC_REGULAR_NB_CONV(hadc->Init.NbrOfConversion)) in 

HAL_ADC_Init to trigger resulting in an assert failure.

CubeMx Version 4.9.0

STM32Cube FW_L1 V1.3.0

#bug #stm32cubemx #stm32l #assert
2 REPLIES 2
stm32cube-t
Senior III
Posted on August 26, 2015 at 16:41

Dear user,

thank you for reporting this issue.

Actually, the parameter

NbrOfDiscConversion

shall not be initialized when Discontinuous conversion is disabled.

The ADC HAL driver will be corrected so that the following line is executed only if Discontinuous conversion is enabled:

assert_param(IS_ADC_REGULAR_DISCONT_NUMBER(hadc->Init.NbrOfDiscConversion));

Best regards
stm32cube-t
Senior III
Posted on October 12, 2015 at 10:46

Dear user,

The fix will be delivered within STM32L1 1.4.0 package supported in our next CubeMX version 4.11 (coming out this month).

Thanks.