2018-12-12 01:35 AM
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
2018-12-12 03:26 AM
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
2018-12-12 07:26 AM
Thank you, i will study that and see what i did wrong.
2019-01-29 08:51 AM
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