cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2DH12 position of 6D.

AGari
Associate II

I use LIS2DH12 to determine the position of 6D. My task is to get interruption when the accelerometer is positioned with the + X axis at an angle of 50 degrees or more. Autumn X is also disabled. In this case, the acceleration along the X axis = 1g. I give below the register settings:

CTRL_REG3 (22h) = 0x40

INT1_CFG (30h) = 0b11000010

INT1_THS (32h) = 0x2F

INT1_DURATION (33h) = 0x02

CTRL_REG1 (20h) = 0b00101111

These are all the settings that I enter in the accelerometer. I don’t touch any registers anymore. What am I missing, help.

7 REPLIES 7
Eleon BORLINI
ST Employee

Hi @AGari​ , did you check the INT1_SRC (31h) register in order to see if the interrupt has been raised at least via software even if not via HW (the INT pin)? Regards

Hello! The 6d interrupt works for me, but only when the acceleration along the X axis is close to 1g, and I need it to work at the level of 0.77g, this is when the angle along the X axis is about 50 degrees. The problem is this.

So you would like to raise the interrupt along the X axis when the acceleration value along this axis is > 0.77g and not just around 1g, right? I suggest you to try to lower the INT1_THS (32h) value, maybe there is a little non-linearity on the threshold steps. Regards

I tried to lower the setting in the register INT1_THS (32h) to different angles, this did not help, I even set small values, about 0.1g, but it still worked when the value was close to 1g. I also tried setting up the awakening function along the X axis (not 6d), here the situation is completely different. At any setting, interruption works if acceleration is greater than 0.1g along the X axis. I suspect a faulty accelerometer.

I should check if the 6D is designed to work only around 1g and to check the sign of the device orientation... btw couldn't you use another embedded digital feature, such as the for example click one, to implement your target app? Regards

Unfortunately I can’t, I make watches, I need them to be activated when I raise my hand and look at the time. I will be very grateful for the help.

Hello! Thanks for the help! I already solved the problem, my mistake was that I sequentially wrote data in two registers, and the accelerometer does not support this mode of operation of I2C