Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

TMS320F28379D: Query about Tempture Sensor

Part Number: TMS320F28379D

Hi Team,

 

The picture above shows the description of the parameters of the offset and equivalent of the internal temperature sensor in the 28035 datasheet.

The picture below shows the description of the internal temperature sensor in TRM.

Question 1. I did not find any description similar to those in the pictures above in the 28379D and 28388D datasheets and TRMs. Could you please tell me where to find the introduction of 28379 and 28388 internal temperature sensors, namely TSLOPE and TOFFSET?

I have the following questions about the function “ADC_getTemperatureC” in the “adc_ex3_temp_sensor” routine of 28379:

I used the LaunchPad of 28379D to look at the values ​​​​of the two addresses above during the debugging process

Question 2. The values ​​of 0x7036E and 0x70372 are both 0x28A9. Could you please tell me what 0x28A9 represents?

Question 3. This question is similar to question 1. I couldn't find any description about TOFFET and TSLOPE in the 28379 datasheet or TRM. Could you please tell me why?

If I hadn’t read the TRM of 035, I wouldn’t know that TSLOPE is in Q15 format. According to the slope value 0x14A5 (5285) observed during debugging, the equivalent of the internal temperature sensor of 28379D is 5285÷32768=0.16℃/LSB, which is similar to 035.

Question 4. I don't quite understand the principle of the highlighted part of the code below, but the purpose of this code should be to convert the floating-point type temp into an integer one from the debugging point of view, right? But I still want to understand the principle.

Question 5. Regarding the description of the parameters of the internal temperature sensor, I did not find it in the 28388 datasheet or TRM. Could you please tell me where I could find it?

Kind regards,

Katherine

  • Question 4 seems to involve a conversion from Celsius to absolute temperature.

    The “temp” represents Celsius in Q15 format, followed by 0x4000 (16384), which is equivalent to adding 0.5 degrees Celsius.

    This part of the code shows that 0 degrees Celsius corresponds to the absolute temperature 273K. The “temp” above is Q15 format Celsius. To convert the result to absolute temperature, this 273 should also be converted to Q15 format, namely multiplied by 0x8000 (32768).

    Sum up the two parts above and we obtain the absolute temperature in Q15 format. Then we convert the absolute temperature value in this Q15 format into the absolute temperature value in Q0 format, namely 0x8000 (32768).

    Finally, the absolute temperature in Q0 format minus the difference between Celsius and the absolute temperature, 273, to obtain the result of Celsius.

    Why do we need to go through these procedures above?

    Can we divide “temp” (Celsius temperature value in Q15 format) by 32768, convert the type to an integer, and sent it back as the result?

  • Hi Katherine,

    I'm looking into the temp sensor functions of F2837x.  This was developed much earlier that F2838x and I would need to look at past logs and codes to make sense of what was happening with the function call.  It would take me a while to come up with the explanations behind the calculations.  Note that the above routines are much different from what was done on F2838x.

    Regards,

    Joseph  

  • Hello Joseph,

    As you said, the calculation method of the 28388 routine was really different from that of the 29379. In addition to this post, I also had a post about the 28388 temperature sensor routine, which was supported by Cherry Zhou.

    (+) TMS320F28388D: Internal temperature sensor acquisition - C2000 microcontrollers forum - C2000Tm︎ microcontrollers - TI E2E support forums

    I understand the first paragraph of the answer. For 28388, the temperature sensor is measured under the 2.5V reference. From the reply, the code value change of 560 represents a temperature change of 95 degrees Celsius (95 x 0.0036V = 0.342V, 0.342VH ÷ 2.5V x 4096 = 560).

    Under the 3V reference, 0.342V ÷ 3V x 4096 = 467, in this case, the code value change 467 represents a temperature change of 95 degrees Celsius.

    In order to unify that the code value conversion 560 means that the temperature changes by 95 degrees Celsius, the conversion result should be multiplied by the coefficient of 1.2 under 3V reference.

    I understand this process now.

    However, I still don't quite understand the answer to the second question in Cherry Zhou's post. I need more time to think about it.

    However, in the 28379 routine, the calculation principle of temp is still very clear. After multiplied by the coefficient of 1.2, subtract the bias and multiplied by the slope. In comparison, I still don’t understand the calculation formula of the 28388 routine.

    Kind regards,

    Katherine

  • Hi Katherine,

    Sorry for the confusion.  I'll try to address the first question on F2837x regarding what is in the memory locations that you pointed out at the start of the thread:

        0x7036E and 0x70372: contain the pointer to the function that calculates the slope and offset of the temp sensor.  I still am trying to locate that function to better understand how the slope and offsets are represented.

        0x7036F: contains the slope (i still need to verify what the unit is if it is in terms of lsb, voltage and the number representation) 

        0x70373: contains the offset 

    For F2838x temperature sensor, I posted another reply to Cherry's post.  Basically, slope is in terms of Volts/ºC.  Offset is in terms of volts.  The temp sensor result is in terms of ADC code so the first term in the temp sensor calculation tempResult*vref/4096.0F converts the sensor reading from LSB to V.  Rest of the calculation is straightforward and the resulting unit after applying the slope and offset values will be in terms of ºC. 

    Regards,

    Joseph