cancel
Showing results for 
Search instead for 
Did you mean: 

Which internal temperature is correct in STM32Cube FW_G4 V1.6.1

SourFish
Associate II

 

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?

4 REPLIES 4

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
Guru

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".

@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.

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".