2016-07-19 12:00 PM
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?
#lsm303agr2016-07-22 2:10 AM
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 regardsMiroslav2016-07-26 5:20 AM
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.2016-07-29 6:36 AM
I figured out that the CTRL_REG5_A BOOT command brings it alive again. Thank you.
2016-09-26 12:57 PM
Is there a similar sequence for LIS3DH ? (Register 60h is not defined for the LIS3DH)
Thanks2016-09-27 4:15 AM
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
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.