cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable an interrupt on LIS3DH that detects twisting of the wrist.

HSakh
Associate

I have enabled 2 interrupts on the LIS3DH all on the I2C Bus :

1) Data Ready Interrupt

2) Orientation Change Interrupt

But during runtime only the Data Ready Interrupt is working. While reading the INT1_SRC register no value is generated. Even after disabling Data Ready Interrupt, I am unable to access the Orientation Change Interrupt.

I have configured the following registers on the LIS3DH

CTRL_REG1(0x20) Value(0x57)

CTRL_REG3(0x22) Value(0x00)

CTRL_REG6(0x25) Value(0x02)

INT1_CFG(0x30) Value(0xE5)

INT1_THS(0x32) Value(0x07)

I have been trying to read the interrupt coming from INT1_SRC(0x31) in the in_pin_handler function and it always returns 0x00

1 REPLY 1
Eleon BORLINI
ST Employee

hi, do you drive the data-ready interrupt (ZYXDA bit) on INT1?

If you want to route the Orientation Change interrupt on INT1 pad please change --> CTRL_REG3(0x22) Value(0x40)

Btw, please try also to change the INT1_DURATION to 01h for check