cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7A3 internal temperature equation Doubt

Kaushal.Panchal
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
POLH
ST Employee

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

View solution in original post

5 REPLIES 5
TDK
Guru

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

okay, Thank you so much for your response.

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

POLH
ST Employee

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
Chief II

> 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

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.