H3LIS331DL Threshold interrupt
Hello,
I have troubles setting the H3LIS331DL accelerometer to trigger an interrupt when a programmed threshold is crossed. I can configure the device to trigger an interrupt when new data is ready on both INT1 and INT2 pad (confirmed with an oscilloscope). However, the threshold interrupt never fires.
I used the following configuration :
- Low power mode @ 10Hz, X/Y/Z axis enable : 0b1100 0111 written in CTRL_REG1
- No high pass filter
- No sleep to wake function
- Threshold interrupt on INT2 pad, interrupt not latched -->CTRL_REG3 = 0
- Full scale range +-100g, block data update : 0b1000 0000 written in CTRL_REG4
- OR combination of interrupt on the 3 axis : 0b0010 1010 written in INT2_CFG
- Threshold value set to ~2g (49mg/LSB @ +-100g) --> 0b0010 1000 written in INT2_THS
- No minimum duration
The different parameters are well written to the sensor (reading them back and oscilloscope measurement).
With this configuration, I read 0b0001 0101 in INT2_SRC (X/Y/Z under threshold) at rest, but shaking it doesn t change.
Since the threshold is defined on 7bits, I assume, that lower than threshold is lower than -2g in this case and not lower than 2g, is this correct (so why do I have 'lower than threshold' flags set in INT2_SRC)?
Decreasing the threshold to 1g and shaking the sensor give the same result, no interrupt are triggered.
Can someone tell me where I messed the configuration of this sensor please?
Cheers