cancel
Showing results for 
Search instead for 
Did you mean: 

IIS2DH INT1 signal generation

Andrea Monterumisi
Associate II
Posted on June 12, 2017 at 11:07

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
7 REPLIES 7
Andrea Monterumisi
Associate II
Posted on June 14, 2017 at 18:21

Hello,

Could anyone please help me to take a look the above register setting?

I want to config the INT1_THS interrupt on INT1.

But

the INT1 pin always stays LOW.

I have verified the INT1 signal with an oscilloscope also disconnecting it from the rest of the circuit.

The register are correctly written because the software performs also for each register a read verification.

Thank you very much.

Marco Pappalardo
Associate II
Posted on June 29, 2017 at 17:15

Ciao Andrea,

I have basically the same problem (and a similar application). I've set up a system using the STEVAL-MKI168V1 and there it works correctly using almost the same configuration as yours.

But then I've placed the IIS2DH in a custom board. I know the I2C communication works just because my firmware has some states that are reached through all the configuration process, and it reaches the final configuration state so every part of accelerometer has been configured properly. BUT in this case INT1 pin never goes high.

I am not able to disconnect from the related input pin, but it's an input pin (so it should not influence the behaviour) and it's configured in the same way of the one that works in the system (moreover it's the identical pin).

Have you tried if removing the latched option or changing the duration of pulse changes the behaviour?

Thanks and hope one of us briefly find the solution.

Marco

Andrea Monterumisi
Associate II
Posted on June 29, 2017 at 18:47

Ciao Marco,

also in my case INT1 works using the eva board

STEVAL-MKI168V1 with 

the same sw.

What I suppose is that there would be some soldering problem in my board.

I have also another problem ,in the EVA board with Vdd and Vdd_IO connected together the power consumption is 70uA @2,5V and 50Hz, not 11uA as declared in the data sheet. The power consumption is 11uA only if I power the eva board with Vdd only.

So actually I have modified my circuit powering the chip with Vdd and enabling Vdd_IO only when I have to communicate with the chip. In particular I have enabled the stream to FIFO mode.

I'm waiting for the new circuits when I've checked them I'll give you an update.

Tell me if you want more info, I'll give you my direct contact.

Andrea

Posted on June 29, 2017 at 19:01

Andrea I have an idea in my mind: in a past forum conversation with an ST expert (that I attach below) I probably find the solution (for me).

At page 39 of datasheet there is written: 'A write operation to this address is possible only after system boot.' related to INT1_CFG register. Now, since it's the first register I set after microcontroller boot, I think the issue could be related to the fact that boot time is faster in my custom board than the one in the test environment. I know it just because in my case I have a delay of about 2-4 seconds in writing to serial port in the evaluation board, and less than half second in the custom one.

What I think is that writing values in this register during boot, as also mentioned by the expert, could cause a malfuntioning, so the pin doesn't go high for this reason.

Hoping this is the cause, I hopefully will test it within tomorrow end, then I can tell you more.

Marco

Posted on September 04, 2017 at 14:44

Hello Andrea,

your sensor configuration seems OK to me, the interrupt should work. I guess there is really a soldering issue on your board.

Concerning the high current consumption, I guess you connected SA0 pin to ground and this pin has internal pull-up so the additional current is cause by this pull-up resistor. Could you please try to connect SA0 to VDDIO and measure the current consumption?

Andrea Monterumisi
Associate II
Posted on September 27, 2017 at 17:27

Hello Moroslav,

I confirm that also in other 5 boards the INT pin doest change status.

About the power consumption, probably you are right, I'm not able to disconnect the pin SA0 from ground because the connection is under the chip.

It is a very strange situation, I'd like to understand, also other guys have the same problem!! (see the message of Marco Pappalardo).

Best regards

It's been a while but I have the exact same problem. INT1 does not go high. I though it's because of the INT1 duration set to 0. I'll try tomorrow but I guess if you set it to zero, it's like the interrupt is disabled.

 

If you have found it, please let me know.

 

Cheers