2025-03-20 10:59 AM
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,