Skip to main content
Visitor II
April 15, 2023
Solved

LSM6DSOX INT1 / INT2 both Interrupt

  • April 15, 2023
  • 1 reply
  • 1460 views

Hello,

I'm trying to set up the two interrupts on the LSM6DSOX, INT1 and INT2 to indicate Single and Double Tap events, respectively.

I'm able to make both events trigger their respective interrupt, but would like them to be completely separate.

I think I need to implement a delay on the Single Tap, to ensure it doesn't operate under double tap condition - it currently operates twice for a double tap!

Is there a way I can do this inside the LSM6DSO, or must I differentiate the interrupts in my microcontroller?

  

WriteRegister( LSM6DSOX_CTRL1_XL, B01100000 ); //Set ODR to 417Hz?
 WriteRegister( LSM6DSOX_CTRL4_C, B00100000 ); //Enable Tap on X,Y,Z
 WriteRegister( LSM6DSOX_TAP_CFG0, B00001110 ); //Enable Tap on X,Y,Z
 WriteRegister( LSM6DSOX_TAP_CFG1, B00001000 ); //Set X Threshold
 WriteRegister( LSM6DSOX_TAP_CFG2, B10001000 ); //Set Y Threshold + Enable Interrupts
 WriteRegister( LSM6DSOX_TAP_THS_6D, B10001000 ); //Set Z Threshold
 WriteRegister( LSM6DSOX_INT_DUR2, B01111111 ); //Set Duration/Quiet/Shock
 WriteRegister( LSM6DSOX_WAKE_UP_THS, B10000000 ); //Set Wake_UP_THS for Single/Double Tap
 WriteRegister( LSM6DSOX_MD1_CFG, B00000000 );
 WriteRegister( LSM6DSOX_MD2_CFG, B01001000 );

    This topic has been closed for replies.
    Best answer by Federica Bossi

    Hi @BenG142​ ,

    Unfortunately it is not possible to do this inside LSM6DSOX, so I suggest you to differentiate the interrupts in your microcontroller.

    If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster :)

    1 reply

    Technical Moderator
    April 18, 2023

    Hi @BenG142​ ,

    Unfortunately it is not possible to do this inside LSM6DSOX, so I suggest you to differentiate the interrupts in your microcontroller.

    If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster :)

    BenG142Author
    Visitor II
    April 23, 2023

    Thank you Frederica,

    Looking into writing to FIFO as a pre-conditioner!

    Appreciate your reply,

    Ben