cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2DH sometimes does not update the XYZ data

che.1
Associate II

I am using LIS2DH to detect the tilt angle of a vessel. Sometimes the XYZ reading will freeze, and not update anymore, the only way to reset it is to power on/off the system.

5 REPLIES 5
Federica Bossi
ST Employee

Hi @che.1​ ,

Welcome to ST Community!

Can you give me more details? For example, which are your settings? Are you in SPI or I2C mode?

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.
che.1
Associate II

The setting for register 0x20 is 0x27,others is default. I am using I2C to read the XYZ since it only detects tilt, so only Z is continuously monitored. Sometimes it will stuck at 960 for the z-axis, will reset 0x20 help?

niccolò
ST Employee

Hi @che.1​ ,

does it happen always after a certain amount of time or is it random?

by freezing do you mean that it always returns the same value continuously or it does not return anything anymore?

can you read the CTRL_reg1 (20h) and CTRL_REG4 (23h) when it happens?

Niccolò

che.1
Associate II

it’s very difficult to recreate the problem. I have 2 broken PCBAs that I have been trying to recreate the problem with for 2 weeks and I haven’t been successful. Once it’s frozen at 960, it never changes until we do a hard reset. (unplug the battery)

I'm sorry, but I'm not able to replicate the issue, so without further info from your side, I don't know how to help you.

the only other thing it can be checked is if the FIFO is full and you are not dumping it, but having default settings it should not be the case.

Let me know if you have any more updates =)

Niccolò