cancel
Showing results for 
Search instead for 
Did you mean: 

I have lsm6dso imu. I want to use two wake up interrupts at the same time. Thresholds and duration will be different. I cannot use it at the same time because I changed the register value while doing the settings.

Iakgu.1
Associate III

I have lsm6dso imu. I want to use wake up interrupt for two different thresholds at the same time,

for example I want to give wake up threshold 1g for interrupt 1,

I want to give 500 mg for interrupt 2. And duration will be different.

I change the value of WAKE_UP_THS, WAKE_UP_DUR registers while configuring second interrupt.

Is it possible to use two thresholds at the same time ? How can I do it ?

1 REPLY 1
Eleon BORLINI
ST Employee

Hi @Iakgu.1​,

I'm afraid that it is not possible to set the same digital feature (such as wake up, free fall, activity...) twice simultaneously...

It is however possible to configure different features, for example mimicking the activity recognition or the single tap detection (TAP_CFGx registers in both cases) as one of the two wake-up events. They are all described in the AN5192 application note, from p. 42. You could then route the two events on the same INT pin (in an AND/OR configuration), or separately on INT1 and INT2.

Alternatively, you could exploit the Finite State Machine feature, configuring two different thresholds and two different durations.

Related documentation can be found in the AN5226 application note: THRESH1, TIMER1 for the first interrupt, THRESH2, TIMER2 for the second interrupt. Some examples of general FSM configurations can be found on Github --> lsm6dso_fsm.c.

Another -maybe more effective- alternative is to use the Machine Learning core of the LSM6DSOX sensor: this allows you to define up to 8 different class for a data pattern recognition (in your case, the classes would be 2, defined from two different threshold and/or different duration). The decision tree can be trained to be able to distinguish simultaneously between two different wake-up events. Here for the related documentation.

-Eleon