2017-08-25 04:46 PM
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
#lsm6dslSolved! Go to Solution.
2017-08-28 02:57 AM
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.
2017-08-28 02:57 AM
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.
2017-08-28 04:24 AM
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?
2017-08-28 06:40 AM
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.2017-08-29 07:07 AM
Thanks for the app note - that is very useful. I also tried reading the register and it works as expected.