Skip to main content
DCh.1
Associate II
January 24, 2020
Question

BUG: CubeMx 5.5.0 STM32G0 wrong SetCommonPathInternalCh initialization

  • January 24, 2020
  • 1 reply
  • 777 views

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
January 27, 2020

​Hello @DCh.1​ ,

Thanks for the fedback , this will be internally checked.

Best Regards,

Khouloud