Skip to main content
MZadn.1
Associate II
January 10, 2023
Solved

LIS2DH12 Activity / Inactivity recognition

  • January 10, 2023
  • 4 replies
  • 1569 views

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?

    This topic has been closed for replies.
    Best answer by Federica Bossi

    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.

    4 replies

    Federica Bossi
    Technical Moderator
    April 7, 2023

    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
    MZadn.1Author
    Associate II
    April 7, 2023

    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
    Federica BossiBest answer
    Technical Moderator
    April 11, 2023

    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
    MZadn.1Author
    Associate II
    April 11, 2023

    The three axis are in OR

    This was the information I was missing. Thank you.