cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum data read/sec in LSM6DSL

Afeefah
Associate II

Hi Team,

I am testing in LSM6DSL and I have a problem with accelerometer data reading.

I am getting 12.73 read/sec while setting 80ms as a timeout in application and getting accurate accelerometer values. If I decrease the timeout less than 80ms, it will increase the data read/sec value but few of the accelerometer axes values goes missing. I wanted to know the maximum read/sec of accelerometer data and is there any method where I can get greater read/sec data without missing the accelerometer values.

Thanks & Regards,

Afeefah Fathima  

6 REPLIES 6
TDK
Guru

The output data rate is configurable up to 6.66 kHz.

TDK_0-1696523100313.png

You can program the INT pin to signal when data is available to be read out.

If you feel a post has answered your question, please click "Accept as Solution".

Hello Team,

I am trying to read accelerometer data by setting frequency from 0x10 to 0xA0, when frequency reaches 0x80(1.66KHz) at this condition i2c write is failing and there will be a halt. I am able to read data at frequency=0x80(1.66KHz) when Low Pass Filter(LPF2_XL_EN) is disabled with halt at 0x90.

Without performing the above scenario If I try to set frequency=0x90/0xA0 only then the axes values are read but only with 376reads/sec. 

Why there is halt at higher frequency and also I wanted to read data >400 reads/sec, Do you have any information regarding this?

Thanks & Regards,

Afeefah Fathima

 

 

TDK
Guru

Unclear what "a halt" entails.

The CPU can only run so fast. Would recommend you look at how long your particular I2C transaction takes and how much additional time your boards needs to due running other stuff in between. A logic analyzer on the SDA/SCL lines may be illustrative and informative.

SPI access will be faster than I2C in general.

If you feel a post has answered your question, please click "Accept as Solution".

@TDK "Unclear what "a halt" entails."

i.e. I2C is hanging at frequency=0x90 (3.33KHz) when I try to write to that particular register.

You haven't clarified anything, you've just replaced "halt" with "hang". How does the I2C hang? Does the function return with an error code? If so, which one? Does it remain in a loop somewhere? If so, where and why exactly?

If you feel a post has answered your question, please click "Accept as Solution".

Hi @TDK ,

No the function doesn't return an error code. It will remain in loop. It is hanging before the pclose(fp) whenever  frequency reaches to high i.e after 0x80 (1.66KHz). Please find the attached screenshot.