Skip to main content
Visitor II
May 17, 2024
Question

LIS2DH12 consecutive Interrupt occur even though only one trigger

  • May 17, 2024
  • 1 reply
  • 890 views

I use accelerometer LIS2DH12 to wake up the device by motion detection. It's working correctly for long time but currently I found a trouble with interrupt. It's rarely happen and hard to reproduce.

Here is my initialization:

 

INT1_CFG = 0010 1010
INT1_THS = 0000 0010
INT1_DURATION = 0000 00010
CTRL_REG2 = 0000 0101
CTRL_REG3 = 0100 0000
CTRL_REG5 = 0000 1010 (LIR_INT1 = 1)
read to clear INT1_SRC

I start up my device and wait device go to sleep, then I lightly touch on my device to wake up, The INT1 signal and I read INT1_SRC register before continue proccess. After that, the INT1 still signals again and again eventhough I leave my device stable on the table.

I have checked LIR_INT1 at CTRL_REG5 that INT1_SRC cleared by reading INT1_SRC but when INT1 signal, I read INT1_SRC (= 0110 1000 for example) then second read INT1_SRC (still = 0110 1000). 

To stop INT1, I have to clear INT1_CFG in my code. Note that, The whole process I make sure that the device stay stable on the desk and only touch at the first time. 

 

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    May 30, 2024

    Hi @DVu.4 ,

    Please try again writing CTRL_REG5 = 0000 1000 (LIR_INT2 = 0) and let me know if this solves.