2020-08-07 04:18 AM
Good afternoon everyone,
I am currently trying to set up my LSM6DSOX into sensor hub (mode 2) in order to plug another sensor to be able to add external sensor value to the MLC decision tree.
I follow a code found on github attached to the driver lsm6dsox_STdC :
I made some debug and I figured out that the code enter an infinite loop when the LSM6DSOX try to read or write a register of the LPS33HW in function lsm6dsox_write_lps22hh_cx and lsm6dsox_read_lps22hh_cx.
More precisely, the infinit loop happend when the LSM6DSOX is waiting for the end of the I2C master operation (master_status.sens_hub_endop stay equal to 0).
Can someone help me understanding what is going on ?
Tanks a lot,
Have a nice day,
Best regards,
Julien Mongin.
2020-08-12 06:32 AM
Hi @Jmong.1,
from what I understood it seems that the problem is you are running an example that works with LPS22HH, using a LPS33HW.
The firmware is stuck when it tries to reach the sensor because it is trying to communicate with the wrong sensor.
To fix this you should use the drivers for the LPS33HW, instead of the ones used in the example, that you can download from:
https://github.com/STMicroelectronics/STMems_Standard_C_drivers/tree/master/lps33hw_STdC
or from the resources page of the C-Driver-MEMS page.
let me know if this solves your issue.