Skip to main content
Visitor II
October 5, 2023
Question

Maximum data read/sec in LSM6DSL

  • October 5, 2023
  • 2 replies
  • 2912 views

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  

    This topic has been closed for replies.

    2 replies

    Super User
    October 5, 2023

    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.

    AfeefahAuthor
    Visitor II
    October 17, 2023

    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

     

     

    Super User
    October 17, 2023

    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.

    AfeefahAuthor
    Visitor II
    October 18, 2023

    @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.

    Super User
    October 18, 2023

    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?