LIS2HH12 ODR Limitations anybody using FIFO?

  • I can't get data out of the LIS2HH12 fast enough at any data rates greater than the lowest 10 Hz setting, using the default bypass mode. This inadequate read rate behavior is discussed in application note DM00165265.pdf on page 13, and I can confirm it by checking the STATUS register ZYXOR overrun bit just before reading the data. The overrun behavior is obvious even at 50 Hz.

    The obvious solution is to use the FIFO but it's not clear to me that this will be sufficient for my purposes. I'd like to use an data rate of at least 100 Hz. Several accelerometer data sheets discuss the preference for using SPI rather than
    I2C since the SPI read rate is higher - this is a built in limitation when using Pysense or Pytrack, including who knows what's going on with the co-processor.

    Is anyone successfully using the FIFO? Before writing the FIFO code to try it out, I think I'll wire in a LIS2HH12 using SPI and see how fast that goes. It's unclear to me whether I2C is the major factor in read rate, python itself, the co-processor or some combination.

    thanks, Tom

  • @tkreyche After some access speed tests, it looks like the LIS2HH12 is usable without the FIFO only at fairly low data rates. I can make it work at 50 Hz without overrun errors but there isn't time to do much of anything else like gc.collect(). So if you need precise timing and high data rates it's not going to work well, with or without the FIFO. The access time to read the x,y,x registers once is about 2.5 ms which is slow and a serious limitation. Next I'll try wiring up an accelerometer with SPI and see what kind of throughput I can get.

  • Read the linked topic. I was stuggeling a lot when trying to do this.

Log in to reply

Pycom on Twitter