2024-01-26 02:36 PM
Hello community,
my sths34pf80 is connected with a wireless MCU through I2C in fast mode.
during the initial process the function " sths34pf80_presence_threshold_set(&presenceHandle, 200); " is called, sometimes there is no problem, the sths34pf80 can be successfully initialized, it can detect presence and motion.
But it also happens oft: if the ctrl1.odr is 8, then it hangs by excuting sths34pf80_odr_safe_set
(if ctrl.odr is 0, the initial will be successful.)
Here is the signal on SCL and SDA:
Solved! Go to Solution.
2024-02-09 02:01 AM
Hi @Danny0007 ,
Here is the link: https://github.com/STMicroelectronics/sths34pf80-pid
Let me know if you solve.
2024-01-27 03:23 AM
2024-02-02 02:24 AM
Hi @Danny0007 ,
This has been fixed in the last driver version that you find here.
Let me know if everything is ok without your workaround that we don't suggest. Thanks :)
2024-02-02 12:50 PM - edited 2024-02-03 01:07 AM
thanks for reply.
I tested the new release, it´s better than before, but still not perfect, because every time after I pressed reset, one time can be correctly initialised, the other time is still hanged at this function: sths34pf80_odr_safe_set(ctx, ctrl1, odr);
so only half of time is working. before maybe less.
and if I remove this line, everything works fine again... it´s my old workaroud, but not suggested.
2024-02-07 05:46 AM
Hi @Danny0007 ,
Thanks for noticed us this issue, we fixed it in the new version. Could you try to use it and let me know if everything works fine?
Also remember to add the callback to mdelay in the platform:
/* Initialize mems driver interface */
dev_ctx.write_reg = platform_write;
dev_ctx.read_reg = platform_read;
dev_ctx.mdelay = platform_delay;
dev_ctx.handle = &SENSOR_BUS;
2024-02-07 01:04 PM
I added the mdelay and tested it, but for me it´s the same old.
here is my function:
2024-02-08 12:54 AM
Hi @Danny0007 ,
Have you updated the STHS34PF80 to the latest commit fe9905f3?
2024-02-08 01:33 PM
could you give me a direct link? which repo do you mean?
2024-02-09 02:01 AM
Hi @Danny0007 ,
Here is the link: https://github.com/STMicroelectronics/sths34pf80-pid
Let me know if you solve.
2024-02-09 01:08 PM - edited 2024-02-09 01:09 PM