cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSOX INT1 / INT2 both Interrupt

BenG142
Associate II

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 );

1 ACCEPTED SOLUTION

Accepted Solutions
Federica Bossi
ST Employee

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 🙂

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.

View solution in original post

2 REPLIES 2
Federica Bossi
ST Employee

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 🙂

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 Frederica,

Looking into writing to FIFO as a pre-conditioner!

Appreciate your reply,

Ben