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.

RM57L843: OTP Temperature Sensor Calibration Values

Part Number: RM57L843

Hello,

I am reading on board temperature values of temperature sensor 2 and 3 on a RM57L843 (PRM57 L843ZWTT YFB-55AV86W Printed on chip) with the wrong temperature reported when using the programmed OTP Calibration values. 193 - 200 Kelvin.

OTP Programmed values are:

Sensor 1

 S2TEMP1 303K

 S2TEMP1VAL 1957

 S2TEMP2 233K

 S2TEMP2VAL 1533

 S2TEMP3 398K

 S2TEMP3VAL 2520

Read Value: 1331, Converted Value: 198.877K

Sensor 2

 S3TEMP1 303

 S3TEMP1VAL 1882

 S3TEMP2 233

 S3TEMP2VAL 1464

 S3TEMP3 398

 S3TEMP3VAL 2456

Read Value: 1281, Converted Value: 202.751K

The reading are changing as expected when the chip is subjected to different environments so I believe the code is working properly and suspect the OTP Calibrated values are wrong. Is this likely the issue or are there other factors that could be effecting this? I verified pinmux settings and adc settings and tried the code on several different boards. The HDK boards had Calibration values of 0xFFFF so I am assuming they did not have temperature calibration preformed. 

Should inhouse temperature calibration be preformed if we want to use the temperature sensors? 

Thanks!

  • Hello Demitri,

    The link below demonstrates how to use the on-chip temperature sensors:
    www.ti.com/.../spna216.pdf

    We will look at your measurement.

    Regards,
    QJ
  • The document has been reviewed and my code lines up with what is described.

    The OTP Calibration values seem to be wrong.

  • could share your code to read temperature, maybe we could give you faster help, regards!

  • Sure:

    float s2_sum_temp = otpREG->S2TEMP1 + otpREG->S2TEMP2 + otpREG->S2TEMP3;
    float s2_sum_val = otpREG->S2TEMP1VAL + otpREG->S2TEMP2VAL + otpREG->S2TEMP3VAL;
    float s2_temp_x_temp = ((otpREG->S2TEMP1 * otpREG->S2TEMP1) + (otpREG->S2TEMP2 * otpREG->S2TEMP2) + (otpREG->S2TEMP3 * otpREG->S2TEMP3));
    float s2_temp_x_val = ((otpREG->S2TEMP1 * otpREG->S2TEMP1VAL) + (otpREG->S2TEMP2 * otpREG->S2TEMP2VAL) + (otpREG->S2TEMP3 * otpREG->S2TEMP3VAL));

    s2_slope = (((s2_temp_x_temp * 3) - (s2_sum_temp * s2_sum_temp))) / (((s2_temp_x_val * 3) - (s2_sum_temp * s2_sum_val)));
    s2_offset = (s2_sum_val - (s2_sum_temp / s2_slope)) / 3;

    float s3_sum_temp = otpREG->S3TEMP1 + otpREG->S3TEMP2 + otpREG->S3TEMP3;
    float s3_sum_val = otpREG->S3TEMP1VAL + otpREG->S3TEMP2VAL + otpREG->S3TEMP3VAL;
    float s3_temp_x_temp = ((otpREG->S3TEMP1 * otpREG->S3TEMP1) + (otpREG->S3TEMP2 * otpREG->S3TEMP2) + (otpREG->S3TEMP3 * otpREG->S3TEMP3));
    float s3_temp_x_val = ((otpREG->S3TEMP1 * otpREG->S3TEMP1VAL) + (otpREG->S3TEMP2 * otpREG->S3TEMP2VAL) + (otpREG->S3TEMP3 * otpREG->S3TEMP3VAL));

    s3_slope = ((s3_temp_x_temp * 3) - (s3_sum_temp * s3_sum_temp)) / ((s3_temp_x_val * 3) - (s3_sum_temp * s3_sum_val));
    s3_offset = (s3_sum_val - (s3_sum_temp / s3_slope)) / 3;

    float offset = 0.0;
    float slope = 0.0;
    uint16_t val = 0U;


    switch(sensor)
    {
    case (TEMPERATURE_SENSOR_2):
    adcREG2->GxSEL[1U] = 0x80000000U; /* start the temperature sensors */
    offset = s2_offset;
    slope = s2_slope;
    break;
    case (TEMPERATURE_SENSOR_3):
    adcREG2->GxSEL[1U] = 0x40000000U; /* start the temperature sensors */
    offset = s3_offset;
    slope = s3_slope;

    break;
    default:
    return -1;
    }

    /* wait for conversion */
    while (!(adcREG2->G1SR & 1)) { /* Spin Wait */ }

    val = adcREG2->GxBUF[1U].BUF0 & 0xFFFU; /* Get Value */

    adcREG2->GxSEL[1U] = 0x0; /* set up the two temperature sensors */


    return ((float)val - offset) * slope;
  • Are there any updates on this?

    Should we be doing in house temp calibrations and not trusting OTP?

    Thanks!
  • Hello Dmitri,

    I went to the top of this thread to get more information on the original problem. If your calibration values from OTP are reading 0xFFFF they were never programmed. This is most likely due to you having an early device sample rather than a production device. Does the device have TMP instead of TMS on the part number marking on top of the device? TMP parts are pre-production where there is a certain percentage of production tests that have been implemented and some that have not. In this case, it would appear the temp sensor calibration hasn't been done.

    My recommendation is if the values in OTP are 0xFFFF then preform your own calibration, but if not, then they can be used as they are. This could be a workaround just for your development and taken out when full production parts are in use. In fact, if you read 0xFFFF from OTP for a production device, I would fail it during manufacturing test and return to TI for evaluation since this means part of the production process was skipped.
  • Thanks for the reply Chuck,

    The problem is that the values are not 0xFFFF on the chip I am using, only the HDK supplied by TI.

    The values out of OTP are:

    S2TEMP1 303K
    S2TEMP1VAL 1957

    S2TEMP2 233K
    S2TEMP2VAL 1533

    S2TEMP3 398K
    S2TEMP3VAL 2520


    Using those values and the reading Read Value: 1331, the Converted Value is: 198.877K which is not realistic. This makes sense from the OTP values if you look the value 1533 reads 233K and my ADC is reporting 1331.

    I tried it again to double check on the other temperature sensor with values:

    S3TEMP1 303
    S3TEMP1VAL 1882

    S3TEMP2 233
    S3TEMP2VAL 1464

    S3TEMP3 398
    S3TEMP3VAL 2456

    I get a Read Value: 1281, Converted Value: 202.751K, again this makes sense looking at the OTP values as a 1464 translated to 233K.

    The Temperature sensor read values definitely change in a cool or warm environment as expected during testing, so the sensors work. The OTP values programmed are not letting me sanely decode the temperature. This can be mitigated by doing an inhouse calibration of temperature readings rather than trusting TI OTP values. Is that the recommended procedure? Is it just the first few batches are flawed?

    Ive tried on a few RM57 chips with the same results, the HDK chips did not have the values programmed in flash so I could not test on TI supplied boards.
  • I think this may be an issue with the ADREFHI being 3.3v during OTP Calibration while the system I am on uses 5v ADREFHI.
  • this could be the case. I don't know under what condition they have calculated the OTP values. I will check this with our OTP experts and get back to you.
  • Dmitri,

    I did some background checking on these OTP values and they are, in fact, taken at an ADREFHI of 3.3V. This is noted in the application note that QJ pointed to before along with a formula of how to convert the OTP values for use when ADREFHI = 5V.

    There is a formula for voltage conversion in the application note:
    www.ti.com/.../spna216.pdf

    * The returned temperature will need to be scaled by the reference voltage difference
    * Calibration values are taken at nominal voltage 3.30V.
    *
    * Kelvin = ReturnValue * (VccADrefHi - VccADrefLow)/3.30V
    * Celsius = Kelvin - 273.15;
    *