cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected Interrupt from LIS2DE12 after initialized to detect a motion / Issue detecting no motion

Tony Yu
Associate

Hi:

We are trying to use LIS2DE12 motion interrupt to wake up a MCU as well as no motion interrupt so MCU can sleep.

Issue #1: Unexpected Interrupt from LIS2DE12 after initialized to detect a motion

LIS is configured as the following setting:

1. CTRL_REG1=0x1F: ODR=1Hz, Z & Y & X all enabled. LPen=1. 
2. CTRL_REG2=0xF1:Again manual doesn't give detailed description especially to the HPF mode. b7b6=11 means autoreset on interrupt event. b5b4=11 means cutoff frequency at 0.002Hz at ODR=1Hz. b0=1 means HP on Interrupt 1.
3. CTRL_REG3=0x40: b6=1 means IA1 on INT1.
4. CTRL_REG4=0x00: Continuousdata update, scale at +/-2g. Also I2C is chosen and self-test is disabled.
5. CTRL_REG5:=0x08: Normal mode. FIFO disabled, INT1 latched. No 4D detection.
6. CTRL_REG6=0x02: Interrupt polarity is falling edge.
7. INT1_THS=0x04 or 64mg at +/-2g scale for motion detection
8. INT1_DURATION=0x03 or 3s @1Hz ODR for motion detection
9. INT1_CFG=0x2A for motion detection, i.e., ZH or YH or XH
 
What we saw is after the above is set while our board sat on the table without any movement, there is an INT1 interrupt in 6 seconds. And the reading of INT_SRC gave 0x69 which means there was an interrupt and ZH and YH are set, but no XH. Don't know why there is such an interrupt.
 
From here, it won't give any interrupt unless we shake the board for more than 3 seconds which is expected.
 
#Issue 2
 
We also try to detect no motion after a motion is detected. What we do is to re-configure INT_CFG register to the following value:
 
INT1_CFG=0x95: means Z and Y and X are all below the threshold 64mg as set earlier. 
 
The issue is that if we change INT1_CFG to be 0x95 to detect no motion after the motion is detected but the motion still exists for a while and then goes away, there was no interrupt for the no motion which is expected to show up after 3 seconds when the motion goes away.
 
Could anyone give some hints why there is an expected interrupt for motion and why the no motion can't be detected if we configure the chip to detect the no motion at the time the motion exists?
 
Thanks a lot.
0 REPLIES 0