2020-11-18 10:44 AM
Hi, I have a LIS3DH accelerometer which I have set up to detect movement by generating interrupt by setting the INT1_CFG register. I also want to detect the orientation of the accelerometer but I do not want both at the same time ( It would be great if I could detect both). I want to alternate between the settings so that when I go to sleep I turn on movement detection with interrupt enabled and when I wake up I want to disable the movement detection and check the orientation. When I switch from movement to position, the readings are all random and movement detection is still enabled. So far, I have not had any luck in doing both besides power cycling the accelerometer and manually changing the settings for each, which is not feasible in my case. I would appreciate any help regarding this.
Thank you.
2020-11-19 04:01 AM
Hi @SChau.2 ,
for my understanding, do you want to do the following two actions, right?
You don't want to manage the wake-up interrupt, am I correct?
Did you try to configure the LIS3DH for movement detection, then go in sleep mode, then resume from the sleep mote and configure the device for orientation detection?
I believe it is necessary to configure again the device when you switch from movement to position detection, since the two are concurrent register configurations on LIS3DH device...
-Eleon