cancel
Showing results for 
Search instead for 
Did you mean: 

INT2_SRC register value for Sleep to Wake event

AB.4
Associate II

Hello,

I have configured LIS2DH12 to generate interrupt on INT2 pin on activity(sleep to wake) using the register values as follows:

CTRL_REG1 - 0x37

CTRL_REG2 - 0x00

CTRL_REG3 - 0x00

CTRL_REG4 - 0x00

CTRL_REG5 - 0x02

CTRL_REG6 - 0x08

ACT_THS - 0x10

ACT_DUR - 0x00

With this configuration, I am able to get an interrupt on INT2 pin. However, when I read INT2_SRC register, the IA bit is not set to 1. Can you please let me know if there is another way to identify the interrupt source for sleep to wake event because I am planning to use the INT2 pin for another event as well.

1 REPLY 1
Miroslav BATEK
ST Employee

The activity/inactivity status doesn't have impact on the IA bit in INT2_SRC register.

You can use INT2 for other event if you will configure it using INT2_CFG register, then if interrupt will be triggered you can read INT2_SRC and see if IA bit is set then the interrupt was caused by valid condition configured using INT2_CFG, INT2_THS, INT2_DURATION. It the IA bit is not set the interrupt was caused by activity/inactivity status change.