Skip to main content
Graduate
February 12, 2024
Question

lsm6dso Tap detection

  • February 12, 2024
  • 3 replies
  • 1889 views

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.

 

    This topic has been closed for replies.

    3 replies

    Technical Moderator
    February 12, 2024

    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?

    VarshaAuthor
    Graduate
    February 13, 2024

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

    Technical Moderator
    February 13, 2024

    Hi @Varsha ,

    Let me check internally and come back to you :)

    VarshaAuthor
    Graduate
    February 19, 2024

    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

    Technical Moderator
    March 1, 2024

    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)