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
-
Read the linked topic. I was stuggeling a lot when trying to do this.
https://forum.pycom.io/topic/1682/pytrack-lis2hh12-interrupts-make-i2c-bus-freeze -
@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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login