Skip to main content
Kaushal.Panchal
Associate
March 15, 2022
Solved

STM32H7A3 internal temperature equation Doubt

  • March 15, 2022
  • 5 replies
  • 1990 views

Hi all,

In STM32H7A3 reference manual section 27.4.33 internal temperature sensor equation

Temperature in °C = TS_CAL2_TEMP - TS_CAL1_TEMP / TS_CAL2 - TS_CAL1*( TS_DATA - TS_CAL1) + TS_CAL1

in Last TS_CAL1 i have doubt because all other H7 family like (STM32H742,STM32H745) datasheet show like below equation Temperature in °C = 110 °C 30 °C / TS_CAL2 -TS_CAL1 * ( TS_DATA TS_CAL1) + 30 °C.

so when i put TS_CAL1 then it give output higher value because in TS_CAL1 = 12344 value so overall output value is 12389 °C something.

but when i put +30 °C at the last then its give reasonable temperature value (30 to 35°C)

so i need to confirm is that any written mistake in datasheet or i doing wrong anything please help me.

Any help is very much appreciated! thank you.

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

I confirm the previous post and that it will be corrected in the next reference manual release.

I guess it's clear for you, just in case: the TS_CAL1 and TS_CAL2 temperatures are described in the datasheet table 99 and are respectively 30C and 130C

5 replies

TDK
March 15, 2022

It's a mistake. The last parameter should be TS_CAL1_TEMP, not TS_CAL1.

0693W00000KcgSSQAZ.png

"If you feel a post has answered your question, please click ""Accept as Solution""."
Kaushal.Panchal
Associate
March 16, 2022

okay, Thank you so much for your response.

when i put last parameter as TS_CAL1_TEMP then it's works fine.

POLH
POLHBest answer
ST Employee
March 24, 2022

I confirm the previous post and that it will be corrected in the next reference manual release.

I guess it's clear for you, just in case: the TS_CAL1 and TS_CAL2 temperatures are described in the datasheet table 99 and are respectively 30C and 130C

Piranha
Principal III
March 24, 2022

> Temperature in °C = TS_CAL2_TEMP - TS_CAL1_TEMP / TS_CAL2 - TS_CAL1*( TS_DATA - TS_CAL1) + TS_CAL1

Without parentheses the formula turns into a complete nonsense. How can a software developer "forget" the parentheses?

POLH
ST Employee
March 28, 2022

Hello

I guess what you want to mention is the formula in the text posted by Hiren.bhuva

  • Or do you speak about a mistake you have seen in an ST code?

You are right without parentheses the formula is obviously wrong, but it's just the post explanation, if the person who has done the post finds the right temp value it means that his code is correct.

But thanks to the post of this person, the TS_CAL1 (written in bold) will be replaced by TS_CAL1_TEMP

and the wrong formula in the reference manual will be corrected in the next release.