IIS2DH INT1 signal generation
Hi,
I have inserted the accelerometer in a custom board.
Is is connected via I2C to a microcontroller, Vdd and Vdd_IO both connected to 3V3.
In my application the micro controller awakes when the acceleration on all the axis is grater than a predetermined threshold.
The configuration works fine and also the data read have sense but the INT1 pin remains low.
Following the registers configuration:
&sharpdefine IIS2DH_CTRL_REG1_DATA ((BYTE)0x47) // ODR = 50Hz, Normal Mode, X + Y + Z axis all enabled
&sharpdefine IIS2DH_CTRL_REG2_DATA ((BYTE)0x00) // filter disabled
&sharpdefine IIS2DH_CTRL_REG3_DATA ((BYTE)0x40) // I1_AOI1; AOI1 interrupt on INT1
&sharpdefine IIS2DH_CTRL_REG4_DATA ((BYTE)0x30) // FS = +/- 16g, No High Resolution
&sharpdefine IIS2DH_CTRL_REG5_DATA ((BYTE)0x08) // Latch Interrupt request on INT1_SRC
&sharpdefine IIS2DH_CTRL_REG6_DATA ((BYTE)0x00) // INT pins active high
&sharpdefine IIS2DH_INT1_THS_DATA ((BYTE)38) // 52*38= 2000mg threshold
&sharpdefine IIS2DH_INT1_DURATION_DATA ((BYTE)0x00) // INT1 duration time 0 ODR
&sharpdefine IIS2DH_INT1_CFG_DATA ((BYTE)0x2A) // OR combination if acceleration in X or Y or Z will be higher than INT1_THR for INT1_DURATION INT1 will be triggered
If I poll continuously the INT1_SRC, the bit IA, ZH, YH and XH are correctly set to 1 when I apply an acceleration greater than the threshold, but the INT1 pin remains low also completely disconnecting the signal from the rest of the circuit.
If I configure the CTRL_REG6 to have the INT1 pin active low, it goes high but it remains high.
Can you help me? What I am wrong?
Thank you in advance.
Best regards
Andrea
#iis2dh-int1-signal-generation