cancel
Showing results for 
Search instead for 
Did you mean: 

LSM303AGR, sensors data stuck, how to reset

Helmut Tschemernjak
Associate II
Posted on July 19, 2016 at 21:00

I had already multiple times the problem that the accelerometer sensor is not providing data anymore. It is connected via SPI, commands like the who_am_i works, however the XYZ data is all zero or just some frozen values. Sometimes only one or two axis, mostly all three.

Re-initializing everything does not fix it, only a power disconnect fixes it.

How can I do a complete reset, which commands?

#lsm303agr
5 REPLIES 5
Miroslav BATEK
ST Employee
Posted on July 22, 2016 at 11:10

Definitely it is not a standard behavior.

You can try to reload accelerometer memory content writing 1 to bit BOOT in CTRL_REG5_A (24h) register and writing 1 to SOFT_RST bit in CFG_REG_A_M (60h) register.

Best regards

Miroslav

Helmut Tschemernjak
Associate II
Posted on July 26, 2016 at 14:20

The problem has been resolved, my interrupt response took way to long, this killed the sensor. Now I am servicing the interrupt by reading the data on time and the sensor does not get stuck. It works how me.

However I feel that the sensor can gets forever stuck is not good.

Thank you.

Helmut Tschemernjak
Associate II
Posted on July 29, 2016 at 15:36

I figured out that the CTRL_REG5_A  BOOT command brings it alive again. Thank you.

Taylor.Sean
Associate II
Posted on September 26, 2016 at 21:57

Is there a similar sequence for LIS3DH ? (Register 60h is not defined for the LIS3DH)

Thanks

Miroslav BATEK
ST Employee
Posted on September 27, 2016 at 13:15

You can try to reboot accelerometer memory content writing 1 to bit BOOT (MSB bit) in register CTRL_REG5_A (24h). See page 32 of the datasheet.

Register 60h is related to magnetometer part of LSM303AGR, so it is not present in LIS3DH.

Best regards

Miroslav