0
\$\begingroup\$

The datasheet of the LSM9DS1 on pages 21-23 is very unclear on how actually the FIFO on the chip works.

First of all, how many FIFOs does this chip have? From several places it looks like just one. In this case data from several channels (temperature, accelerometer, gyroscope) should be mixed there. I do not see any explanation how. How can reader understand what is he getting from the FIFO?

Can it be that FIFO is simply not working on this chip and it should not be enabled and used?

Once FIFO is enabled can I still use the data ready bits in the STATUS_REG 0x17?

\$\endgroup\$
1
  • 1
    \$\begingroup\$ since it is called "Accelerometer and gyroscope FIFO" I guess the answer to the last question is probably no \$\endgroup\$ Commented Aug 30, 2022 at 8:26

1 Answer 1

1
\$\begingroup\$

To clear things up for you, the FIFO is a 32-block of 3*16bits registers. It only stores accelerometer and gyroscope data. Temperature and magnetometer data is not FIFO'd ; The magnetometer has a different serial interface by the way.

In addition, you don't communicate with the FIFO directly from your microcontroller/processor. But you read the OUT_[...] registers from your serial interface. The chip manages the FIFO internally. Example of a read sequence :

enter image description here

Can it be that FIFO can be used only for accelerometer?

Yes, if you've set the sensor to accelerometer only. Otherwise the FIFO is filled with both accelorometer and gyroscope data. The distribution of the data depends on your ODR (Output Data Rate) of each one ; If the ACC and GYR have the same ODR, then their data will be evenly distributed in the FIFO.

enter image description here

Can it be that FIFO is simply not working on this chip and it should not be enabled and used?

How did you come up with such conclusion ? Please read the datasheet carefully. I know it's a bit hard to do when you're new to electronics. But comprehension is the most valuable skill in this field.

Do they have any FIFO on the magnetometer?

No

All pictures were screened from the datasheet you gave.

PS : if you're planning on writing a driver for this sensor, don't reinvent the wheel and check STMicro's github of their C-drivers for their sensors : https://github.com/STMicroelectronics/STMems_Standard_C_drivers

\$\endgroup\$
3
  • \$\begingroup\$ Hi Rahmany, your answer has little to no value (unfortunately). Ex you write that temp is not FIFO'ed. Check FIFO_TEMP_EN flag on page 54. Some points as the space is limited in the comment. Figure 7. What reg numbers should I read? Will it shift itself from x1D to x28? I mean a 12-bytes long i2c message. What will happen if I will read regs in other sequence? Ex 6-bytes from x18 and then 6-bytes from x18 again? If the ODR of the accel/gyro is different, can I still use the FIFO? What is the data rate for the temperature? How is it set? \$\endgroup\$
    – Buran
    Commented Aug 31, 2022 at 3:29
  • \$\begingroup\$ Why do I think that FIFO might be broken? Because at least the author of the doc cannot explain its idea. It may happen the same to the engineers who implemented the chip. I have experience like that. Do you have your own experience with this chip or just speculating on what is not written there? I have plenty of experience with putting wrong meaning into vague and unclear statements. Thanks for the pointer to ST's drivers, although it is about 7k lines long. Not sure it will be good for me. \$\endgroup\$
    – Buran
    Commented Aug 31, 2022 at 3:30
  • \$\begingroup\$ I updated the question a little bit. Please update your answer. \$\endgroup\$
    – Buran
    Commented Aug 31, 2022 at 3:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.