Visitor II
December 9, 2025
Question
STHS34PF80 – Data remains constant, TOBJECT = -48
- December 9, 2025
- 1 reply
- 73 views
Hello,
I am trying to get the STHS34PF80 sensor working on an STM32L0 platform via I²C. My initialization sequence is as follows:
- Algorithm reset according to AN5867:
CTRL2 (0x21) = 0x10 // FUNC_CFG_ACCESS = 1 PAGE_RW (0x11) = 0x40 // FUNC_CFG_WRITE = 1 FUNC_CFG_ADDR (0x08) = 0x2A FUNC_CFG_DATA (0x09) = 0x01 PAGE_RW (0x11) = 0x00 CTRL2 (0x21) = 0x00
Interrupt configuration:
CTRL3 (0x22) = 0x05AVG_TRIM:
0x10 = 0x01Continuous mode:
CTRL1 (0x20) = 0x15 (BDU=1, ODR=4 Hz according to datasheet)
After this, I wait for EXTI interrupt (DRDY). On interrupt, I read:
- STATUS (0x23)
- TOBJECT_L/H (0x26/0x27) and etc.
- FUNC_STATUS (0x25)
Problem:
- The TOBJECT value remains constant (-48), even when I place a hand or heat source in front of the sensor.
- Presence/motion flags in FUNC_STATUS almost never change. Occasionally, I see a value of 1, but very rarely, even when moving a hand or breathing near the sensor.
- See attached screenshot of current data from the terminal.
Questions:
- Is my initialization sequence correct?
- What could cause TOBJECT to stay constant?
- Are there recommended threshold and AVG settings for reliable detection?
Thanks for any tips or reference to a working example.
