cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSV sensor hub with LIS2MDL through external trigger but don't work

NWang.1
Associate II

Hello ST guys:

We want to use LSM6DSV(IMU) with an external magnetometer(LIS2MDL) through Sensor Hub mode to gather data and place acc, gyr and mag readings in the FIFO. We want to make INT2 into an input signal which triggers the sensor hub. And we configure following registers to make START _CONFIG = 1 according to following documentation:

NWang1_0-1725590897185.png

 

sh_cfg_read.slv_add = (LIS2MDL_I2C_ADD & 0xFEU) >> 1; /* 7bit I2C address */
sh_cfg_read.slv_subadd = LIS2MDL_OUTX_L_REG;
sh_cfg_read.slv_len = 6;
lsm6dsv_sh_slv_cfg_read(&dev_ctx, 0, &sh_cfg_read);
lsm6dsv_fifo_sh_batch_slave_set(&dev_ctx, 0, PROPERTY_ENABLE);
lsm6dsv_sh_syncro_mode_set(&dev_ctx, LSM6DSV_SH_TRIG_INT2);  
lsm6dsv_sh_data_rate_set(&dev_ctx, LSM6DSV_SH_120Hz);	
lsm6dsv_sh_slave_connected_set(&dev_ctx, LSM6DSV_SLV_0_1);
lsm6dsv_sh_master_set(&dev_ctx, PROPERTY_ENABLE);

 

We also configure data ready signal on LIS2MDL:

 

lis2mdl_drdy_on_pin_set(&lis2mdl_ctx, PROPERTY_ENABLE);

 

But we don't get any external mag sensor samples from FIFO and we also use function lsm6dsv_all_int_source_get check but don't get anything. Is there any misunderstanding about the register configuration for INT2(Sensor Hub) or any good suggestions? Thank you very much.

BRs. 

 

0 REPLIES 0