Skip to main content
Associate II
May 10, 2025
Solved

Which internal temperature is correct in STM32Cube FW_G4 V1.6.1

  • May 10, 2025
  • 4 replies
  • 1344 views

 

I want to use Macro "__LL_ADC_CALC_TEMPERATURE" to calculate the chip's temperature. But there is a difference here.

 

SourFish_0-1746894897106.png

SourFish_1-1746894916843.png

As mentioned above, in datasheet, TS_CAL2 corresponds to 130 ℃.

But in STM32Cube FW_G4 V1.6.1, file "stm32g4xx_ll_adc.h", line 386, TEMPSENSOR_CAL2_TEMP corresponds to 110 ℃.

 

Which one is ture?

This topic has been closed for replies.
Best answer by TDK

It is 130 and is correct in the GitHub version, but a library release has not yet been made which includes this fix.

stm32g4xx-hal-driver/Inc/stm32g4xx_ll_adc.h at 1a4f1ca138a19dfe42becc50975f11a1e7554e31 · STMicroelectronics/stm32g4xx-hal-driver

Solved: Re: STM32G431 TS_CAL2 temperature - STMicroelectronics Community

 

This issue was fixed a few years ago, then broken, and now fixed but not yet released.

4 replies

unsigned_char_array
Lead III
May 10, 2025

Please tell us what your exact MCU model you have, what datasheet version you used and what version STM32CubeMX and version of firmware pack you use(FW_G4 V1.6.1?).

"Kudo posts if you have the same problem and kudo replies if the solution works.Click ""Accept as Solution"" if a reply solved your problem. If no solution was posted please answer with your own."
TDK
TDKBest answer
May 10, 2025

It is 130 and is correct in the GitHub version, but a library release has not yet been made which includes this fix.

stm32g4xx-hal-driver/Inc/stm32g4xx_ll_adc.h at 1a4f1ca138a19dfe42becc50975f11a1e7554e31 · STMicroelectronics/stm32g4xx-hal-driver

Solved: Re: STM32G431 TS_CAL2 temperature - STMicroelectronics Community

 

This issue was fixed a few years ago, then broken, and now fixed but not yet released.

"If you feel a post has answered your question, please click ""Accept as Solution""."
unsigned_char_array
Lead III
May 10, 2025

@TDK wrote:

This issue was fixed a few years ago, then broken, and now fixed but not yet released.


That's bad. How can something like that happen? Does nobody review pull requests at ST?

"Kudo posts if you have the same problem and kudo replies if the solution works.Click ""Accept as Solution"" if a reply solved your problem. If no solution was posted please answer with your own."
TDK
May 10, 2025

Do 99 things right and 1 thing wrong and people will always focus on the 1. People are human, mistakes happen. Nobody bats 100%.

"If you feel a post has answered your question, please click ""Accept as Solution""."