cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DS3 sensor hub

Alex Dim
Associate II

Hello,

i read the AN4650 application note for the LSM6DS3 accle+gyro and i tried to implement the sensor hub routine with a MAG3110, like the one in the examples but it doesn't seem to work, is there another application note or a sample code that i can look at?

Thank you in advance,

Alex

3 REPLIES 3
Miroslav BATEK
ST Employee

I doubt the problem is in our application note, anyway you can find an example in ST GiHub:

https://github.com/STMicroelectronics/STMems_Standard_C_drivers/tree/master/lsm6ds3_STdC/example

Alex Dim
Associate II

Thank you, i will study that and see what i did wrong.

Hello,

i studied extensively the "sensor_hub_lis2mdl_lps22hb_no_fifo_simple" example so i can use the LSM6DS3 with an external magnetometer. There are 4 lines that i cannot understand, in the main example there is the code below

       /*
       * Configure LIS2MDL on the I2C master line
       */
     
     lis2mdl_operating_mode_set(&mag_ctx, LIS2MDL_CONTINUOUS_MODE);
      lis2mdl_offset_temp_comp_set(&mag_ctx, PROPERTY_ENABLE);
      lis2mdl_block_data_update_set(&mag_ctx, PROPERTY_ENABLE);
      lis2mdl_data_rate_set(&mag_ctx, LIS2MDL_ODR_50Hz);

that passes all the desirable options to the registers of the external LIS2MDL magnetometer, i cannot understand how this is possible since it doesn't use the sensor-hub pass-through feature or the required steps to write to an external slave sensor.

Thank you in advance, you have been very helpful

  •