AnsweredAssumed Answered

IIS2DH INT1 signal generation

Question asked by Andrea Monterumisi on Jun 12, 2017
Latest reply on Sep 27, 2017 by Andrea Monterumisi

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:

#define IIS2DH_CTRL_REG1_DATA         ((BYTE)0x47)  // ODR = 50Hz, Normal Mode, X + Y + Z axis all enabled

#define IIS2DH_CTRL_REG2_DATA ((BYTE)0x00) // filter disabled

#define IIS2DH_CTRL_REG3_DATA ((BYTE)0x40) // I1_AOI1; AOI1 interrupt on INT1

#define IIS2DH_CTRL_REG4_DATA ((BYTE)0x30) // FS = +/- 16g, No High Resolution

#define IIS2DH_CTRL_REG5_DATA ((BYTE)0x08) // Latch Interrupt request on INT1_SRC

#define IIS2DH_CTRL_REG6_DATA ((BYTE)0x00) // INT pins active high

#define IIS2DH_INT1_THS_DATA ((BYTE)38) // 52*38= 2000mg threshold

#define IIS2DH_INT1_DURATION_DATA ((BYTE)0x00) // INT1 duration time 0 ODR

#define 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

Outcomes