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.

[参考译文] MSPM0G1506:内部温度计结果输出不正确

Guru**** 2383590 points
Other Parts Discussed in Thread: SYSCONFIG
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1340406/mspm0g1506-internal-thermometer-results-are-not-output-correctly

器件型号:MSPM0G1506
主题中讨论的其他器件:SysConfig

你好。 我叫 Mori。

我检查了内部温度计、但没有给出预期的结果。
我检查了外部温度何时为23.3℃、但结果是4℃。
TEMP_SENSE0.DATA 设置为749、并输出 AD 值为1907。 (Vref 为1.4V)
AD 值将比预期值高大约100个计数。

•TSC =-1.8mV/C
•TEMP_SENSE0.DATA = 749
•TSTRIM = 30℃
•ADCCODE = 1907

VSAMPLE (MV):1907 * 1400 / 4096≒651
VTRIM (MV):749 * 3300/4096≒603
TSAMPLE:(1/-1.8)*(651 - 603)+ 30≒4

我已附加了 SysConfig 设置的图像。
如果有任何问题、请告诉我。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Mori:

    温度传感器校准因子使用3.3V 的基准值、修整温度在25 C 下获得。

    //Formula found in TRM Section 2.2.5
    #define TEMP_TS_TRIM_C                                            ((uint32_t)25)
    /*
     * Constant below is (1/TSc). Where TSc is Temperature Sensor coefficient
     * available in the device datasheet
     */
    #define TEMP_TS_COEF_mV_C                                             (-571.42f)
    
    //Gets the voltage for the trim temp, this is done at 25 C
    float VTrim = 3.3/4096 * (DL_SYSCTL_getTempCalibrationConstant() -0.5);
    
    //Gets the voltage for the sample from the ADC
    float Vsample = 3.3/4096 * (adcResult - 0.5);
    
    //Takes the voltage from trim and ADC to get temperature in C
    float gTemperatureDegC = (1/TEMP_TS_COEF_mV_C * 1000) * (Vsample - VTrim) + TEMP_TS_TRIM_C;
    
    //converts C to F
    float gTemperatureDegF = 9.0/5.0 * gTemperatureDegC + 32;

    我注意到代码与数据表中显示的温度传感器系数之间存在差异、所以让我为您进行研究。

    此致、

    卢克

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Luke

    感谢您的答复。
    我知道数据表和代码是不同的。
    感谢您的调查。

    ・TSC =-571.42mV/C
    ・TSTRIM = 25℃

    我尝试了检查操作、但与外部温度= 23.4℃ 相比、输出为24.9℃。
    它几乎与 TSTRIM 相同、但
    暂时继续进行此设置。

    感谢您的答复。