Skip to main content
Visitor II
January 27, 2021
Solved

Temperature offset in LSM6DSRX's Temperature sensor

  • January 27, 2021
  • 2 replies
  • 964 views

I'm using the temperature sensor in LSM6DSRX.

In page 12 (4.3 Temperature sensor characteristics) of the Datasheet (see the image), what is "Toff" (Temperature Offset)?

The Table 4 gives a range of -15 to +15 C for Toff, what is this range for? The Table also gives the operating range of -40 to +85 C.

I was wondering how to use "Toff" in calculating the temperature ?

Thanks for any help!

0693W000007Cwx3QAC.png

    This topic has been closed for replies.
    Best answer by Eleon BORLINI

    Hi @AFars.1​ ,

    the values declared in the datasheet refers to the maximum and minimum value for the offset at 25°C of the internal sensor. The typical value is however close to 0 (i.e., the T sensor effectively measure 25°C at true 25°C), and the range limits have a lot of margin.

    For temperature measures that require deep accuracy, I suggest you to compare the value with the one of a reference temperature sensor at true 25°C and store the offset via software for real-time or post processing compensation.

    For completeness, please consider the below formula for the temperature raw value conversion (source Github lsm6dsrx_reg.c:(

    float_t lsm6dsrx_from_lsb_to_celsius(int16_t lsb)
    {
     return (((float_t)lsb / 256.0f) + 25.0f);
    }

    In case this answer helped you, please select this as "best".

    -Eleon

    2 replies

    ST Employee
    January 29, 2021

    Hi @AFars.1​ ,

    the values declared in the datasheet refers to the maximum and minimum value for the offset at 25°C of the internal sensor. The typical value is however close to 0 (i.e., the T sensor effectively measure 25°C at true 25°C), and the range limits have a lot of margin.

    For temperature measures that require deep accuracy, I suggest you to compare the value with the one of a reference temperature sensor at true 25°C and store the offset via software for real-time or post processing compensation.

    For completeness, please consider the below formula for the temperature raw value conversion (source Github lsm6dsrx_reg.c:(

    float_t lsm6dsrx_from_lsb_to_celsius(int16_t lsb)
    {
     return (((float_t)lsb / 256.0f) + 25.0f);
    }

    In case this answer helped you, please select this as "best".

    -Eleon

    AFars.1Author
    Visitor II
    January 29, 2021

    Thank you, Eleon!

    Abi