cancel
Showing results for 
Search instead for 
Did you mean: 

Using multiple interrupts on 1 interrupt pin - LIS2DW12

ZAIDS-S23
Associate III

Greetings

I am currently using the LIS2DW12 accelerometer, in continuous-to-fifo mode, with the wake-up interrupt configured to INT1, and the DIFF5 interrupt configured to INT2. All works well, as I'm able to read the FIFO contents when the FIFO is full after the interrupt occurs. 

I am now trying to use the INACTIVITY functionality, using the SLEEP_CHG interrupt on INT2. I was able to get this working previously, where I used the wake-up interrupt on INT1, and SLEEP_CHG on INT2, as advised in this post.

If I combine interrupts on INT1 or INT2, the accelerometer fails to work at all. I have tried other FIFO interrupts (both FIFO_FTH and FIFO_DIFF5) on both pins, with no success. As a result, I am unable to sample, and store samples in the FIFO, and then let the accelerometer go into its inactivity state. I am only able to  use the wake-up interrupt on INT1, and the FIFO_DIFF5 interrupt on INT2.

Is there a reason for this and\or has it been picked up before, or am I surely doing something wrong? 

I am aware I have to read the registers, for the respective FIFO interrupts (from the FIFO_SAMPLES register) or SLEEP_CHG interrupt (in the ALL_INT_SRC register), if I use the same pin for multiple interrupts.

 

Any help would be appreciated, attn @Federica Bossi 

 

1 REPLY 1
ZAIDS-S23
Associate III

Seems like I should not be reading the ALL_INT_SRC register in my ISR, and I cannot use anything else but Bypass-to-continuous mode, to implement the inactivity function. After removing that read operation from the ISR and using bypass-to-continuous mode, the device seems to work but for only 2 wake-ups. After 2 wake-ups, the FIFO doesn't fill and no sampling is done.