Skip to main content
Super User
April 19, 2020
Solved

STTS22H - what is the temperature registers format?

  • April 19, 2020
  • 6 replies
  • 1535 views

I may be exceptionally dumb, but I can't find in the STTS22H DS, how can the measured temperature be determined from the values read from the temperature registers.

What am I missing?

JW

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

    Hi @Community member​ , you can also refer to the online available C drivers (github link) for the conversion between LSB (concatenate TEMP_H_OUT and TEMP_L_OUT) and °C in STTS22H

    float_t stts22h_from_lsb_to_celsius(int16_t lsb)
    {
     return ((float_t)lsb /100.0f);
    }

    Regards

    6 replies

    Super User
    April 20, 2020
    ST Employee
    April 20, 2020

    Hi @Community member​ , you can also refer to the online available C drivers (github link) for the conversion between LSB (concatenate TEMP_H_OUT and TEMP_L_OUT) and °C in STTS22H

    float_t stts22h_from_lsb_to_celsius(int16_t lsb)
    {
     return ((float_t)lsb /100.0f);
    }

    Regards

    Super User
    April 20, 2020

    Hi @Eleon BORLINI​ ,

    Okay; but isn't the DS the primary source which ought to contain this information?

    And, once we are at it, what's exactly the meaning of BDU bit in CTRL register?

    Frank, @KnarfB​ ,

    Yes, that DS - can you see in there how to interpret the values read out of the TEMP_L_OUT/TEMP_H_OUT registers?

    Thanks,

    JW

    ST Employee
    April 20, 2020

    Hi @Community member​ , technically you are not wrong... I'll report it to the product champion. Thank you for your note. Regards

    Super User
    April 20, 2020

    Thanks, @Eleon BORLINI​ .

    Jan

    ST Employee
    April 27, 2020

    Hi Jan, after an internal check we should be able to add in the next datasheet revision a paragraph explaining in a clearer way the temperature readings interpretation, similar to the below-shown LPS22HH's one:

    0693W000000WWQQQA4.jpg

    Regards

    Super User
    April 27, 2020

    Hi @Eleon BORLINI​  ,

    Thanks. Looking forward to the new STTS22H datasheet!

    Jan