H3LIS331DL interrupt inconsistancy
Hi,
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:
-272Y:
-144Z:
400(
INT1 active
)
X:
32Y:
-64Z:
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:
256Z:
-2144(
INT1 NOT active
)
X:
-224Y:
-80Z:
192(
INT1 NOT active
)
X:
-96Y:
-80Z:
496(
INT1 NOT active
)
X:
-16Y:
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:
32Y:
16
Z:
0(
INT1 NOT active
)
X:
96Y:
160Z:
-400(
INT1 active
)
X:
-96Y:
-32Z:
176(
INT1 active
)
X:
-80Y:
-32Z:
256(
INT1 NOT active
)
Interrupt was activated, but the data did never reach the threshold!
Can anyone explain this?
Edit:
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.
