Skip to main content
DCh.1
Associate II
Jan 24, 2020 6:16 PM UTC
Question

BUG: CubeMx 5.5.0 STM32G0 wrong SetCommonPathInternalCh initialization

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);

This topic has been closed for replies.

1 reply

Khouloud ZEMMELI
ST Employee
Jan 27, 2020 7:44 AM UTC

​Hello @DCh.1​ ,

Thanks for the fedback , this will be internally checked.

Best Regards,

Khouloud