2025-12-09 10:36 AM
Hello,
I am trying to get the STHS34PF80 sensor working on an STM32L0 platform via I²C. My initialization sequence is as follows:
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) = 0x05
AVG_TRIM:
0x10 = 0x01
Continuous mode:
CTRL1 (0x20) = 0x15 (BDU=1, ODR=4 Hz according to datasheet)
After this, I wait for EXTI interrupt (DRDY). On interrupt, I read:
Problem:
Questions:
Thanks for any tips or reference to a working example.
2025-12-24 1:54 AM
Hi @los_trpaslikos ,
Are you using STM32L0 platform together with a custom PCB with STHS34PF80? Can you please give us more details on you HW setup? Did you find out this issue only on one part?
2026-01-08 2:01 AM
Hi @casadeib ,
we are using a fully custom PCB design with STM32L0, and the STHS34PF80 is connected exactly according to the reference schematic in the datasheet.
I have now received a second hardware unit, and with the exact same firmware the sensor behaves correctly. As proof, I am attaching two screenshots from the serial terminal: one from the working board and one from the non‑working board, showing both the configuration read back after initialization and the live data stream.
Based on this comparison, it really looks like the first unit I was testing is defective.
I would like to ask: is it possible that an incorrect register access sequence, during early development of our custom driver, could damage or “lock” the internal digital engine of the sensor?
For example, a wrong sequence involving FUNC_CFG_ACCESS or writing to embedded-function registers — could this permanently affect the sensor?
I also managed to reproduce another interesting scenario:
When I run the sensor in continuous mode but map DRDY to the interrupt pin instead of MOTION, I still see T_OBJECT stuck at –48 on the faulty unit, yet motion and presence detection clearly work in this configuration. This is quite strange and again suggests a problem internal to the first sensor.
In the next weeks we expect to receive more hardware units, so I will be able to test and compare more samples.
At the moment, however, I only have these two boards, and only one of them works as expected.
Thanks for any guidance.