2020-09-02 04:11 AM
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
Solved! Go to Solution.
2020-09-03 06:41 AM
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!
2020-09-02 07:11 AM
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:
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
2020-09-02 08:08 AM
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.
2020-09-03 12:46 AM
If you have the hw capability, you may also check if everything is well if the DRDY is driven on INT1 pin... Regards
2020-09-03 03:55 AM
Hello,
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.
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.
2020-09-03 06:41 AM
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!
2020-09-03 06:46 AM
But is the INT2 still not working also on the new LIS2HH12?
Thanks for your detailed report and regards
2020-09-03 06:51 AM
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.