2022-03-15 01:52 AM
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.
Solved! Go to Solution.
2022-03-24 02:30 AM
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
2022-03-15 06:04 AM
It's a mistake. The last parameter should be TS_CAL1_TEMP, not TS_CAL1.
2022-03-15 09:42 PM
okay, Thank you so much for your response.
when i put last parameter as TS_CAL1_TEMP then it's works fine.
2022-03-24 02:30 AM
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
2022-03-24 04:06 PM
> 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?
2022-03-28 05:23 AM
Hello
I guess what you want to mention is the formula in the text posted by Hiren.bhuva
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.