AnsweredAssumed Answered

H3LIS331DL interrupt inconsistancy

Question asked by Martijn Jonkers on Mar 12, 2018
Latest reply on Mar 19, 2018 by Martijn Jonkers



I am working on a project where we are using the H3LIS331DL accelerometer.

I am trying to understand what is happening with the interrupts, because I see some inconsistant behaviour.


I got the following samples sampled at 400Hz with a max range of 200g. The threshold is set to 2, which should correspond to a value of 512 in the data registers ((2/128)*32768). I have the latched option enabled and configured INT1 for the threshold interrupt and enabled the high pass filter for data and interrupt generation.


X:288       Y:416    Z:-1648  (INT1 NOT active)
X:-272     Y:-144    Z:400    (INT1 active)
X:32        Y:-64      Z:576    (INT1 active)

The 1st sample has no interrupt, but the 2nd and 3th do have the interrupt active, why is that? I expected the 1st and the 3th sample to generate an interrupt, not the 2nd.


Secondly I noticed some other data i could not wrap my head around. Here a 4 sample, sampled in succession:

X:464      Y:256      Z: -2144    (INT1 NOT active)
X:-224     Y:-80      Z: 192      (INT1 NOT active)
X:-96      Y:-80       Z:496       (INT1 NOT active)
X:-16      Y:32        Z:528       (INT1 NOT active)

None of these sample values generated an interrupt!! I expected -2144 and 528 to give me an interrupt.


In the same set of samples I also have the following samples:

X:32      Y:16        Z:0          (INT1 NOT active)
X:96      Y:160      Z: -400   (INT1 active)
X:-96     Y:-32      Z: 176      (INT1 active)
X:-80     Y: -32      Z: 256    (INT1 NOT active)

Interrupt was activated, but the data did never reach the threshold!


Can anyone explain this?



After investigating the INT1_SRC value in more detail I sometimes saw the ZH, XH or YH bit set, but the IA was not.

can anyone please explain what is happening?

I have interrupts enabled for a high events on all axis.


Thank you.