cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSL inactivity interrupt triggered by activity

Angelo Quattrociocchi
Associate II
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
1 ACCEPTED SOLUTION

Accepted Solutions
Miroslav BATEK
ST Employee
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

View solution in original post

4 REPLIES 4
Miroslav BATEK
ST Employee
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
Angelo Quattrociocchi
Associate II
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?

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.
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.