cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2DH12: use Wake-up and double tap feature at the same time

PLedu
Associate

I want to configure LIS2DH12 to get an interrupt when a movement is detected and when a double tap is detected.

In the application I work on, I have to detect if there is a movement on the device where the accelerometer is and at the same time if there is a double tap. I used the example for Wakeup recognition and Double-tap recognition. I can make interrupt works separately but I can’t get them work together. When the register INT1_SRC (0x31) and CLICK_SRC(0x39) are read, depending int threshold and duration for INT1 and INT_CLICK, I have always only one interrupt report in registers.

There is the la configuration a tried:

REG2:  LIS2DH_HPCLICK_MASK  | LIS2DH_HPIA1_MASK

REG3:    LIS2DH_I1_CLICK             | LIS2DH_I1_IA

REG4:   LIS2DH_HR_MASK

INT1_CFG: LIS2DH_ZHIE_MASK | LIS2DH_YHIE_MASK | LIS2DH_XHIE_MASK

INT1_THS: 0x09

INT1_DUR: 0x00

CLICK_CFG: LIS2DH_ZD_MASK | LIS2DH_YD_MASK | LIS2DH_XD_MASK

CLICK_THS: 0x08

TIME_LIMIT: 0x18

TIME_LATENCY: 0x0C

TIME_WINDOW: 0xE0

In resume I have to do a tamper (tilt) detection and a double tap detection, with LIS2DH12 at the same time. Can you help me please

0 REPLIES 0