Skip to main content
Visitor II
October 19, 2019
Question

Both INT1 and INT2 for tilt and free fall by LIS3DH?

  • October 19, 2019
  • 1 reply
  • 782 views

i m using LIS3dh accelerometer. Now i worked with 2g tilt sensor by using INT1.Now i want to add a feature like free fall by INT2.Is it possible to do both on different interrupts?

If its so plz share me the registers value.

    This topic has been closed for replies.

    1 reply

    ST Employee
    October 21, 2019

    Hi @Vanna.222​ , right, you can configure two digital feature on the two interrupts and run them together.

    Here below the pseudo-code for free-fall interrupt routed and detected on INT2 interrupt pin.

    1. Write 57h into CTRL_REG1 // Turn on the sensor, enable X, Y, and Z
    // ODR = 100 Hz
    2. Write 00h into CTRL_REG2 // High-pass filter disabled
    3. Write 80h into CTRL_REG3 // Interrupt activity driven to INT2 pad
    4. Write 00h into CTRL_REG4 // FS = ±2 g
    5. Write 02h into CTRL_REG5 // Interrupt 2 pin latched
    6. Write 16h into INT2_THS // Set free-fall threshold = 350 mg
    7. Write 03h into INT2_DURATION // Set minimum event duration
    8. Write 95h into INT2_CFG // Configure free-fall recognition
    9. Poll INT2 pad; if INT2 = 0 then go to 10 // Poll INT1 pin waiting for the free-fall event
    10. (Free-fall event has occurred; insert your code
    here) // Event handling
    11. Read INT2_SRC register // Clear interrupt request
    12. Go to 9

    Regards