Skip to main content
Visitor II
April 11, 2024
Solved

[STM32L412] CubeMX generated LL code for ADC TEMP channel

  • April 11, 2024
  • 1 reply
  • 893 views

Hi,

I'm using CubeMX 6.11.0 (STM32L4 package version 1.18.0) to generate code for the STM32L412 with LL drivers.

My configuration enables the VREFINT and TEMP channels for ADC1.

The generated function MX_ADC1_Init() contains the line

 

 

LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE(ADC1), LL_ADC_CHANNEL_VREFINT|LL_ADC_CHANNEL_TEMPSENSOR);

 

 

which should actually be

 

 

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

 

 

This prevents correct temperature channel measurements.

This topic has been closed for replies.
Best answer by STTwo-32

Hello @ml512 and welcome to the ST Community :smiling_face_with_smiling_eyes:.

Thank you for reporting this. I've escalated this to the concerned team for correction (under internal ticket number 179295).

 

Best Regards.

STTwo-32 

1 reply

STTwo-32
STTwo-32Best answer
Technical Moderator
April 11, 2024

Hello @ml512 and welcome to the ST Community :smiling_face_with_smiling_eyes:.

Thank you for reporting this. I've escalated this to the concerned team for correction (under internal ticket number 179295).

 

Best Regards.

STTwo-32