cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2DH12 Activity / Inactivity recognition

MZadn.1
Associate II

According to datasheet and AN5005, LIS2DH12 accelerometer can go to sleep & wake up + generate I2_ACT interrupt when acceleration goes below / above the threshold defined in ACT_THS.

Which acceleration exactly is taken into account for this strategy? Maximum / minimum of X,Y,Z? Resultant? Is gravity compensated for or not?

1 ACCEPTED SOLUTION

Accepted Solutions
Federica Bossi
ST Employee

Hi @Community member​ ,

This functionality also works the same way. The three axis are in OR so if one axis is above the threshold you have the switch.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4
Federica Bossi
ST Employee

Hi @Community member​ ,

Welcome to ST Community!

As you can see in fig 8 of AN5005, when you use wake up if one axis is above the defined threshold you have the I2_ACT interrupt.
_legacyfs_online_stmicro_images_0693W00000bhiw3QAA.pngIf my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster!

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
MZadn.1
Associate II

Hi Federica,

If I got it right, figure 8 applies to the free-fall and wake-up configuration of INTx interrupt that is set up by writing to INTx_CFG, INTx_THS and INTx_DURATION registers.

My question was about another functionality that is configured by writing to ACT_THS (0x3Eh) and ACT_DUR (0x3Fh) registers:


_legacyfs_online_stmicro_images_0693W00000bhj3xQAA.png 

Which acceleration is considered above, underlined in red? There is no such register for this functionality, as there are INT1_CFG and INT2_CFG for free-fall and wake up-interrupts, which allow the AND / OR combination of some / all axes to be specified. So how are the 3 axes combined together here to make the device switch between "Sleep-to-wake" and "Return-to-sleep"?

Federica Bossi
ST Employee

Hi @Community member​ ,

This functionality also works the same way. The three axis are in OR so if one axis is above the threshold you have the switch.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
MZadn.1
Associate II

The three axis are in OR

This was the information I was missing. Thank you.