cancel
Showing results for 
Search instead for 
Did you mean: 

Single and Double tapping on LSM6DSL accelerometer

DZado.2
Associate II

Hello,

 I am trying to detect Single & Double tapping on LSM6DSL accelerometer.

I am configuring the relevant registers as follows:

CTRL1_XL=0x60
TAP_CFG=0x8E
TAP_THS_6D= 0x8
INT_DUR2=0x45
WUP_THS=0x80
MD1_CFG=0x48

Every time I tap the accelerometer, and interrupt is generated and the I read the TAP_SRC register to identify the type of the type.

The  X_TAP, Y_TAP and Z_TAP  bits are updated properly.

But I NEVER get the SINGLE_TAP and DOUBLE_TAP bits set - They are always ZERO.

Can someone please help me what am doing wrong?

Thanks

1 REPLY 1
Federica Bossi
ST Employee

Hi @DZado.2 ,

Can you try to follow the two examples on Github and let me know if you solve the problem?

Unfortunately, we don't have specific examples for LSM6DSL but you can you those for LSM6DSM because the tap detection registers do not change between the two products.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.