LIS2DE12: help for configuring Stream to FIfo active on INT2
HI, I would like to use the LIS2DE12 to detect displacement (if someone moves my product from it starting place). As i should not be disturbed by vibration (workers, kick,…) I would like to do the detection in two steps :
1) Use INT2 to detect small movement (with custom threshold and duration)
2) Use STREAM to FIFO based on this ISR in order to soft process data in order to discard or not the event => I want to use INT1 to warm me when the FIFO is full
INT2 works fine but the STREAM to FIFO always generate interrupt (At the end of 32 frames reading, the interrupt INT1 rise UP even though INT2 don’t move…).
Can you help me to configure the device ?
My configuration is :
CTRL_REG1 = 0x4F
CTRL_REG2 = 0x07
CTRL_REG3 = 0x04
CTRL_REG4 = 0x00
CTRL_REG5 = 0x4B
CTRL_REG6 = 0x60
INT1_CFG = 0x7F
INT2_CFG = 0x6A
INT2_THS = 0x05
INT2_DURATION = 0x68
After I clear Interrupt by reading both INT1_SRC and INT2_SRC.
Finally I set FIFO_CTRL_REG = 0 (to reset fifo) and then FIFO_CTRL_REG = 0xDF (Enable Stream to FIFO mode)
INT1 should rise up only after INT2 active and FIFO overrun, but it is not the case and the interrupt INT1 is all time active.
Thanks for helping me
