cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSOX sensor hub mode 2 with LPS33HW : I am facing issues when I try to access the LPS33HW

Jmong.1
Associate II

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 :

https://github.com/STMicroelectronics/STMems_Standard_C_drivers/blob/master/lsm6dsox_STdC/example/lsm6dsox_sensor_hub_fifo_lps22hh.c

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.

1 REPLY 1
niccolò
ST Employee

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.