This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ControlSuite 1.90 F2837xD_TempSensorConv.c does not work for negative temperatures

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