cancel
Showing results for 
Search instead for 
Did you mean: 

BUG: CubeMx 5.5.0 STM32G0 wrong SetCommonPathInternalCh initialization

DCh.1
Associate II

Both VREFINT and TEMPSENSOR ADC channels enabled. CubeMX generates following init code:

 /** Configure Regular Channel 
 
 
 
 */
 
 
 
 LL_ADC_REG_SetSequencerChAdd(ADC1, LL_ADC_CHANNEL_TEMPSENSOR);
 
 
 
 LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(ADC1), LL_ADC_PATH_INTERNAL_TEMPSENSOR);
 
 
 
 /** Configure Regular Channel 
 
 
 
 */
 
 
 
 LL_ADC_REG_SetSequencerChAdd(ADC1, LL_ADC_CHANNEL_VREFINT);
 
 
 
 LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(ADC1), LL_ADC_PATH_INTERNAL_VREFINT);
 

Second call to LL_ADC_SetCommonPathInternalCh overwrites first call and only VREFINT remains, not both.

Should be LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(ADC1), LL_ADC_PATH_INTERNAL_VREFINT | LL_ADC_PATH_INTERNAL_TEMPSENSOR);

1 REPLY 1
Khouloud ZEMMELI
ST Employee

​Hello @DCh.1​ ,

Thanks for the fedback , this will be internally checked.

Best Regards,

Khouloud