cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to use an external clock source for lSM6DSL?

jb
Associate II

Hi,

I am reading FIFO from a couple LSM6DSL IMUs, but the FIFO generation speed seems a bit different even if all of them are in the same configuration. I am suspect it is the different of the internal clock source. Does anyone know if it is possible to synchronized all clocks by using an external clock source? Thanks in advance.

2 REPLIES 2
Eleon BORLINI
ST Employee

Hi @jb​ , you can feed of course the device with the external SPI clock, but unfortunately is not possible to change the internal clock. Are you referring to a jitter issue in the FIFO data reading? Did you set the BDU bit in CTRL3_C (12h) and/or the STOP_ON_FTH bit in FIFO_CTRL4 (09h), to assure that the single data available is ok and the FIFO is full before reading it? Alternatively, you could try to synchronize better two different LSM6DSL using the Mode 2 - Sensor hub mode feature described in the AN5040 p.58: in sensor hub mode (Mode 2) you can connect up to 4 external sensors to the I2C master interface of the master LSM6DSL device and you can trigger the slave sensors acquisition with the INT2 pin. Regards

0693W000001q1qfQAA.png

jb
Associate II

Hi @Eleon BORLINI​ 

Thank you for your information.

I set the BDU bit in CTRL3_C and STOP_ON_FTH in my code.

I am reading the six IMUs in FIFO continuous mode, and the data looks good.

I use SPI to read data from 6 IMUs.

When the code read it, I checked whether there is data on the FIFO. If there is no data in the FIFO, SPI's CS jumps to the next IMU and reads it until FIFO gets empty then jumps to the next one so on, otherwise, it will keep jumping until it reaches one IMU has data. All data looks all correct to me.

FIFO is reading at 833HZ and Since they have the same configuration, all 6 IMUs should have the same FIFO rate.

However, when I count the number of times each IMU is read, one IMU is read significantly more than others, this causes some trouble for our data processing method.

"c" below in the picture is counting the number of times each IMU is read, we can see that c0 is 2000 more than others when the number is around 70000+ and the gap is increasing when the time is longer.

I am suspected that the internal clock of the IMU is different from one to one, but I am not certain. Do you have any suggestions on this? Thank you