So - the formula (immediately above) works easily & well enough - but from where did those key values originate? Note: Data from LX4F datasheet.
For example: 147.5°C, 2.7V, 75 & 55.
One classical way to attack such a problem is to manipulate the formulas/givens to their limits. Looking @ Vtens - it has negative, linear slope and is maximized when the right side term drives toward zero. This occurs when TEMP = -55. With TEMP @ -55°C, Vtens = 2.7V, its maximum. Thus the 55 in our list of key values has been justified. (55 "nulls out" the -55)
Now - how did this 2.7V originate? It is a given - and results from the projection of the Volt/Temp "curve" into the X origin. W/in the MCU die - this is likely a semi-conductor junction at/around a major dissipation point w/in the MCU. The 2.7V value is a good 80%+ of Vdd and is sufficiently offset so that superb voltage regulation into the junction is provided. Only temperature should impact this specially chosen MCU sense point.
Onto 147.5°C - how strange... As our Volt/Temp curve is negative, and linear, this 147.5 results when the right side term of TEMP drives toward zero. And this occurs when var ADCcode = 0. Again - just as with the 2.7V - this is a given by the chip designer. It's extremely doubtful that our die reaches this point - the curve and internal configurations project this value.
Only 75 remains - and it is the "slope" of the aforementioned Volt/Temp curve. Its units are of interest - they are degrees/volt. This is determined by dividing the "span" of the temperature (+147.5°C to -55°C = 202.5°C) by the "span" of the voltage (2.7V). Thus 202.5°C/2.7V = 75°C/volt. As a check 75C/V * 2.7V = 202.5C. This 75°C/Volt holds over the 2 smaller temperature ranges graphed - as well.
Keep in mind that the MCU's internal die temp is almost always considerably higher than the MCU's surroundings. And - if driving/controlling power electronics - the temperature of those power devices is likely to be of higher importance...
This MCU temperature sensing is a valuable feature - hope that this explanation raises the understanding and utilization of this capability...
