cancel
Showing results for 
Search instead for 
Did you mean: 

LIS3DH: FIFO configuration freezes acceleration readings

Rodrigo2IoT
Associate II

Hello all,

I want to use FIFO to store my acceleration data.

When FIFO is not configured, the data I read from OUT_X_L, OUT_X_H, OUT_Y_L, OUT_Y_H, OUT_Z_L, OUT_Z_H are okay. By "not configured" I mean FIFO_CTRL_REG = 0x00, which is the default value that corresponds to the bypass mode.

But when I write FIFO_CTRL_REG = 0x40 to select "FIFO mode" (or any other mode, such as "stream mode"), the data from OUT_*_* are frozen: I always get the same values every time.

I didn't even enable FIFO on CTRL_REG5 (bit FIFO_EN=0), nor did I enable anything on CTRL_REG3 (to allow interrupts triggered by FIFO overrun or FIFO watermark).

When I do enable FIFO on CTRL_REG5 and the interrupts on CTRL_REG3, but keep FIFO_CTRL_REG = 0x00, acceleration data are still okay.

When I configure everything properly by enabling FIFO, selecting any mode that is not "bypass mode" and its interrupts, acceleration data are frozen.

So the issue really seems to be selecting anything that is not "bypass mode" on FIFO_CTRL_REG.

 

Could anyone help me? Did I do anything wrong?

Thanks!

2 REPLIES 2
liaifat85
Senior III

Double-check that you're writing the correct values to the FIFO_CTRL_REG register. A mistake in the register address or the value being written could cause unexpected behavior.

If you want to switch to something simpler, you can use MPU6050 gyro

Federica Bossi
ST Employee

Hi @liaifat85 ,

Thanks for your input to solve the issue of @Rodrigo2IoT 

I think that if Rodrigo is interested in switching products, he can find many more good from ST: for example, LSM6DSV16X in case he is also interested in the gyroscope, or our new low-power accelerometers such as LIS2DW12 or LIS2DUX12.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.