Other Parts Discussed in Thread: CONTROLSUITE
In the latest ControlSuite, v1.90, the function GetTemperatureC in F2837xD_TempSensorConv.c does not properly return negative temperatures. I am using CCS6 v6.4.9 compiler. The return equation
return ((sensorSample - tempSensor_tempOffset)*tempSensor_tempSlope + FP_ROUND + KELVIN_OFF)/FP_SCALE - KELVIN;
has a mixture of UINT16, INT16, and floats, and I suspect the compiler is elevating something to UNIT16. I changed all variables to floats, and the function now properly returns negative temperatures.
Jim