cancel
Showing results for 
Search instead for 
Did you mean: 

iNemo (LSM6DS3) with external trigger

Alan Chambers
Associate II
Posted on January 09, 2017 at 10:41

I would like to use an iNemo with an external magnetometer (i.e. Sensor Hub mode) to gather data and place acc, gyr and mag readings in the FIFO. Is it possible to have the mag drive the ODR of the iNemo with its data ready line?

The mag data is the most important, and it would be nice to collect data at its max ODR of 220Hz. The iNemo supports rates of 208Hz, 416Hz, and so on. I would prefer to avoid rates where I get duplicates or dropouts in the mag data.

Thanks.

4 REPLIES 4
Miroslav BATEK
ST Employee
Posted on January 10, 2017 at 21:02

I think it is not possible to drive LSM6DS3 ODR by external magnetometer, but I will check it with specialist on this sensor and come back to your question.

Posted on January 11, 2017 at 09:58

Thank you. I've found some comments in AN4650 which indicate that the MASTER_CONFIG (1Ah) register can be used to make INT2 into an input which triggers the sensor hub. I'd appreciate any additional information you might be able to provide.

Posted on January 16, 2017 at 13:30

Hi Miroslav,

Did you find out more about whether I can trigger the FIFO from the external interrupt on INT2? I was thinking I could run the accelerometer and gyro at (say) 208Hz (one of the built in options), but have the values written to the FIFO when the magnetometer data is ready (at 220Hz). This would result in some duplicates in the acc and gyr data, but that is not as important as the mag.

At what point is the data from the external sensor actually read? I've assumed it is read on the data ready interrupt. When I set up INT2 as an input as described above, I get no data in the FIFO at all. I may have missed some other setting to make this work.

Thanks.

Posted on January 16, 2017 at 15:11

Hi Alan,

I have checked with the sensor specialists and I got the following respond. It is not possible to drive the ODR of LSM6DS3 by external sensor, but you can synchronize write to FIFO operation by external sensor. So the solution would be exactly what you say in the last message. Run the accelerometer and gyroscope and certain frequency (if you set high ODR, the time discrepancy between magnetometer and accelerometer+gyroscope samples will be minimized) and store data in the FIFO when magnetometer DRDY interrupt occurs.

Please check chapter 7.2.2 in application note AN4650 for proper INT2 input settings (MASTER_ON, START_CONFIG) also check chapter 7.3 where is written: if the DATA_VALID_SEL_FIFO bit is set to 1, writing data in the FIFO is triggered by the sensor hub. So the reading data by sensor hub from megnetometer will be triggered by data ready signal and writing to FIFO will be triggered by end of sensor hub operation. 

For you information, I was also notified that the Sensor Hub I2C clock is only 100kHz.

I hope it will help you to solve the problem.