cancel
Showing results for 
Search instead for 
Did you mean: 

ADC initialization uses wrong constant for internal path

NPaqu.1
Associate

The following line of code is generated by CubeMX v6.14.0.202502271554 for a STM32G070RBTx using FW Package v1.6.2:

LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(ADC1), LL_ADC_AWD_CH_VREFINT_REG|LL_ADC_AWD_CH_TEMPSENSOR_REG);

The constants used are for the Analog Watchdog in ADC_CFGR1 and have no relation to the internal path configuration in ADC_CCR.  This can configure the wrong internal paths and change the ADC clock prescaler.

As stated in the function description, the constants should be one of the following:

  * @PAram  PathInternal This parameter can be a combination of the following values:
  *         @arg @ref LL_ADC_PATH_INTERNAL_NONE
  *         @arg @ref LL_ADC_PATH_INTERNAL_VREFINT
  *         @arg @ref LL_ADC_PATH_INTERNAL_TEMPSENSOR
  *         @arg @ref LL_ADC_PATH_INTERNAL_VBAT

 

Regards,

1 REPLY 1
KDJEM.1
ST Employee

Hello @NPaqu.1 and welcome to the community,

 

Thank you for bringing this issue to our attention.

I reported internally.

Internal ticket number: 206182 (This is an internal tracking number and is not accessible or usable by customers).

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.