Skip to main content
Explorer
December 7, 2023
Question

The STTS22 temperature sensor gives me back 0 °C

  • December 7, 2023
  • 2 replies
  • 2997 views

I am reporting below a post created in March 2023 because I did not receive any response.

 

Hello everyone,

after some time that I use the sensor, it gives me back a temperature value of 0 °C.

I'm using a library taken from github that I adapted to work with the STM32F407 microcontroller (can't post the link).

The sensor works well but sometimes (not always) it "fails" and gives me back the value 0 °C. To "fix" it I have to reboot the whole system. Can anyone give me an explanation? Why is this happening?

I use STM32F407 microcontroller.

Thank you.

    This topic has been closed for replies.

    2 replies

    Super User
    December 7, 2023

    Consider why you didn't get any responses. No code, no link to code, very little supporting information, no debugging. In short, not much to go off of.

    > To "fix" it I have to reboot the whole system. Can anyone give me an explanation? Why is this happening?

    Sounds like a code bug.

    Can you put a logic analyzer on the SDA/SCL lines to verify the data coming through is 0 °C?

    From your other post, sounds like you have some voltage issues where 3.3V drops. Did you investigate that possibility further? You can monitor VBAT voltage.

    No many people here use Arduino code.

    SSerg.4Author
    Explorer
    December 11, 2023

    Thank you for your answer,
    Do you know if there is an official library to drive this sensor?
    Thank you.

    Technical Moderator
    December 12, 2023

    Hi @SSerg.4 ,

    Have a look at our official drivers on github that you can find here.

    Hope this helps.

    SSerg.4Author
    Explorer
    December 18, 2023

    Thank you for your answer,

    I will test the  official drivers you have indicated.