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.

[参考译文] TMS320F2800157-Q1:需要有关 OTP 斜率地址和偏移地址的信息。

Guru**** 2551110 points
Other Parts Discussed in Thread: C2000WARE

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1194159/tms320f2800157-q1-information-is-required-on-otp-slope-address-and-offset-address

器件型号:TMS320F2800157-Q1
主题中讨论的其他器件:C2000WARE

你(们)好

我需要有关 OTP 斜率地址和 OTP 偏移地址的信息、以便通过内部温度传感器的 ADC 值计算温度。 数据表中没有可用信息。 请帮帮我。

谢谢、

Rohit Nilagar

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

    您好、Rohit、

    感谢您的提问。 我正在与专家就此进行咨询。 请在一周结束前提供答复。


    此致、

    Vince

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

    您好、Rohit、

    感谢您的提问。 C2000Ware driverlib 实际上已经为您在每个器件的"adc.h"文件中使用定义了这些值。 请安装最新的 C2000Ware (在过去一周内发布)、并查看以下定义和函数:

    #define ADC_EXT_REF_TSSLOPE  (*(int16_t *)((uintptr_t)0x701B2))
    #define ADC_EXT_REF_TSOFFSET (*(int16_t *)((uintptr_t)0x701B3))
    
    // temp sense calculation
    static inline int16_t
    ADC_getTemperatureC(uint16_t tempResult, float32_t vref)
    {
        float32_t temp;
    
        //
        // Read temp sensor slope and offset locations from OTP and convert
        //
        temp = (float32_t)tempResult * (vref / 2.5F);
        return((int16_t)((((int32_t)temp - ADC_EXT_REF_TSOFFSET) * 4096) /
                         ADC_EXT_REF_TSSLOPE));
    }

    此致、

    Vince