cancel
Showing results for 
Search instead for 
Did you mean: 

lsm6dso Tap detection

Varsha
Associate III

I tried running the code present in the github link -  https://github.com/STMicroelectronics/STMems_Standard_C_drivers/blob/master/lsm6dso_STdC/examples/lsm6dso_tap.c

for Tap detection. But in the logs, I'm not able to see the axis/sign, even after tapping(both single and double tap). 
1) Do I need to configure Interrupt pins for this to work? as I tried polling.

2) Can someone explain me the background of how tap detection is working? and how to configure the time.

 

5 REPLIES 5
Federica Bossi
ST Employee

Hi @Varsha ,

In section 5.5 of the AN5192 you find all the information about single-tap and double-tap recognition.

Did you use the example as in github or did you make any modification?

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.

Hi @Federica Bossi Thank you!
No I didn't make any modifications to the example code in github

Federica Bossi
ST Employee

Hi @Varsha ,

Let me check internally and come back to you 🙂

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.

Thank you @Federica Bossi I had few hardware issue from my side, now Tap detection is working. 
The issue is, whenever double tap is detected, I'm getting interrupts for both single tap as well as double tap.

How do I get only single tap and double tap? currently both are routed to int2 pins

Federica Bossi
ST Employee

Hi @Varsha ,

We did a test and we got the signs:

S-Tap: x-axis negative sign
S-Tap: x-axis negative sign
S-Tap: x-axis negative sign
S-Tap: x-axis negative sign
S-Tap: x-axis negative sign
S-Tap: x-axis negative sign
S-Tap: x-axis negative sign
S-Tap: z-axis positive sign
S-Tap: z-axis positive sign
S-Tap: z-axis positive sign
S-Tap: z-axis positive sign
S-Tap: z-axis positive sign
S-Tap: z-axis positive sign
S-Tap: z-axis positive sign
S-Tap: z-axis positive sign
S-Tap: z-axis positive sign
S-Tap: z-axis positive sign
S-Tap: z-axis positive sign

Can you give me more information about your h/w setup? I would also advise you to check if you are using the right I2C address (in the example I use LSM6DSO_I2C_ADD_L, but maybe you should use LSM6DSO_I2C_ADD_H)

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.