cancel
Showing results for 
Search instead for 
Did you mean: 

INT2 (DRDY) pin is high all the time

HTimm.1
Associate II

Hello,

i want lis2hh12 to scan for x,y and z-value with 10Hz.

When signals are ready i want to get a DRDY signal on INT2.

When i read out the data via SPI the INT2 shall become low.

My problem is that INT2 is high and it never goes low.

My configuration:

CTRL1 = 0x97

CTRL2 = 0x00

CTRL3 = 0x00

CTRL4 = 0x06

CTRL5 = 0x00

CTRL6 = 0x01

CTRL7 = 0x00

Reading out of x,y and z values does work.

Temperature does also work.

Only the information via INT2 that data is ready does not work.

I hope anyone can help.

Thanks a lot,

Holger

1 ACCEPTED SOLUTION

Accepted Solutions
HTimm.1
Associate II

Now it does run.

The actual configuration is:

CTRL1 0x9F

CTRL2 0x00

CTRL3 0x01

CTRL4 0x06

CTRL5 0x00

CTRL6 0x00

CTRL7 0x00

Int1 does work. I do not know why Int2 does not work.

Also the signal Int1 is without disturbance now. (I do not know why)

I got a new problem that the answer for x and y was fix.

After calculation 1996mg for x and -1996mg for y.

z was OK.

I changed LIS2HH12 by another one and now all runs fine.

Thanks a lot!

View solution in original post

7 REPLIES 7
Eleon BORLINI
ST Employee

Hi @HTimm.1​ , it is like the DRDY signal on INT2 pin is somehow latched, isn't it? The registers configuration seems ok, but can you please check also the LIR bits of register CTRL7 (26h)? Should confirm they are 00h. If so, I suggest you to check a couple of other things:

  1. check the SPI/I2C speed: should be << of the ODR speed. This to guarantee that the DRDY has the time to go low before a new set of X-Y-Z data is available. You can enable the BDU bit in CTRL1 register (thus becoming 9Fh) to be sure all the data are complete.

0693W000003QZsvQAG.png

Please consider also this description you can find in AN4662 application note, p.14:

The data-ready signal rises to 1 when a new set of acceleration data has been generated and is available to be read. The interrupt is reset when the higher part of the data of all the enabled channels has been read (29h, 2Bh, 2Dh). If the output registers have not been read for a long time, a dummy read must be performed in order to clear the data-ready signal.

2. read IG_SRC2 (37h) register to check if the interrupt is correctly risen.

3. enable the INT2_IG1 bit og CTRL6 reg and check if something changes.

Regards

Hello Eleon,

thank you for the quick answer.

The LIR bits are set to 0.

I enabled the BDU bit in CTRL register.

Ich checked AN4662.

The IG_SRC2 register is 0x00 when interrupt pin is high.

I enabled INT2_IG1 bit of CTRL 6.

Tomorrow i will check the SPI speed. That is about 100.000 bits per second while ODR is 10Hz.

That is not << ODR.

If you have the hw capability, you may also check if everything is well if the DRDY is driven on INT1 pin... Regards

HTimm.1
Associate II

0693W000003QfMqQAK.pngHello,

on scope i can see something on the interrupt pin.

But it is no clear signal.

After each SPI communication i do a pause.

The longer the pause the longer the spaces on the scope.

The second picture is when i configure INT1.0693W000003QfVTQA0.png

 Here i can see that the measure is done every 100ms (10 Hz).

INT1 does work. But the signal is very ugli for low signal.

HTimm.1
Associate II

Now it does run.

The actual configuration is:

CTRL1 0x9F

CTRL2 0x00

CTRL3 0x01

CTRL4 0x06

CTRL5 0x00

CTRL6 0x00

CTRL7 0x00

Int1 does work. I do not know why Int2 does not work.

Also the signal Int1 is without disturbance now. (I do not know why)

I got a new problem that the answer for x and y was fix.

After calculation 1996mg for x and -1996mg for y.

z was OK.

I changed LIS2HH12 by another one and now all runs fine.

Thanks a lot!

But is the INT2 still not working also on the new LIS2HH12?

Thanks for your detailed report and regards

HTimm.1
Associate II

I just did the test.

When i switch CTRL3 and CTRL6 the Int2 does fine on the new device.

It seems that my first device is buggy.