Skip to main content
Graduate
August 25, 2017
Solved

LSM6DSL inactivity interrupt triggered by activity

  • August 25, 2017
  • 2 replies
  • 2084 views
Posted on August 26, 2017 at 01:46

I'm trying to configure an LSM6DSL device to provide the wrist tilt interrupt on INT2 and the inactivity interrupt on INT1.  The tilt interrupt appears to work fine.  With inactivity however, I see the interrupt when the part is inactive, but I get it again when it starts moving.  I feel that it is combining the wake up and inactivity interrupts together, but I have the wake up interrupt disabled.

This is how I configure the registers after a reset (using CTRL3_C = 0x01):

(general)

CTRL1_XL (0x10) = 0x62

(wrist tilt)

CTRL10_C (0x19) = 0x84

DRDY_PULSE_CFG_G (0x0B) = 0x81

(inactivity)

TAP_CFG (0x58) = 0xE0

WAKE_UP_DUR (0x5C) = 0x02

WAKE_UP_THS (0x5B) = 0x03

MD1_CFG (0x5E) = 0x80

With MD1_CFG set to 0x80 (only the INT1_INACT_STATE bit set, and the INT1_WU bit cleared) why would I see interrupts when the device is moved around?  Am I missing some register setting?

Thanks,

Angelo

#lsm6dsl
    This topic has been closed for replies.
    Best answer by Miroslav BATEK
    Posted on August 28, 2017 at 11:57

    This is inherent behavior of the sensor. The interrupt is generated when the sensor enters to inactivity mode and also when it escapes from this mode.

    You can check the if the sensor is in inactivity mode by reading SLEEP_STATE_IA bit in WAKE_UP_SRC register.

    0690X000006082JQAQ.png

    2 replies

    ST Employee
    August 28, 2017
    Posted on August 28, 2017 at 11:57

    This is inherent behavior of the sensor. The interrupt is generated when the sensor enters to inactivity mode and also when it escapes from this mode.

    You can check the if the sensor is in inactivity mode by reading SLEEP_STATE_IA bit in WAKE_UP_SRC register.

    0690X000006082JQAQ.png
    Graduate
    August 28, 2017
    Posted on August 28, 2017 at 13:24

    Thanks Miroslav, I didn't know that's how it behaved (don't see that in the datasheet).  I'll perform a read to check the sleep state.  So to be clear, when I get an inactivity interrupt (after the device has become inactive) it will be asleep and I should expect the SLEEP_STATE_IA bit to be high, correct?

    ST Employee
    August 28, 2017
    Posted on August 28, 2017 at 13:40

    Yes, your understanding is correct.

    For details please have a look to the application note

    https://my.st.com/resource/en/application_note/dm00402563.pdf

     chapter 5.6.
    Graduate
    August 29, 2017
    Posted on August 29, 2017 at 14:07

    Thanks for the app note - that is very useful.  I also tried reading the register and it works as expected.