cancel
Showing results for 
Search instead for 
Did you mean: 

Acitivity/Inactivity duration configuration

RK1803
Associate

I am working with LIS2DW12 configuring the INT1 for the activity/inactivity interrupt. With the below configurations (as provided in the datasheet), 

1. Write 50h in CTRL1 // Turn on the accelerometer // ODR = 200 Hz, FS = ±2 g

2. Write 42h in WAKE_UP_DUR // Set duration for inactivity detection // Set duration for wake-up detection

3. Write 42h in WAKE_UP_THS // Set activity/inactivity threshold // Enable activity/inactivity detection

4. Write 20h in CTRL4_INT1_PAD_CTRL // Activity (wake-up) interrupt driven to INT1 pin

5. Write 20h in CTRL7 // Enable interrupts

As expected the interrupt is triggered as an when there is an activity (movement).

I want the interrupt to be triggered when the activity is prolonged for 5 secs. I tried playing around with the CTRL1 & WAKE_UP_DUR settings. But results are not as expect. Kindly advice.

 

 

 

 

 

1 REPLY 1
Federica Bossi
ST Employee

Hi @RK1803 ,

The wake-up interrupt event can be delayed in function of the value of the WU_DUR[1:0] bits of the WAKE_UP_DUR register: 1 LSB corresponds to 1/ODR time, where ODR is the accelerometer output data rate.

When the wake-up event is detected, the interrupt is set high for 1/ODR period, then it is automatically deasserted
(the WU_IA event on the pin must be routed by setting the INT1_WU bit of CTRL4_INT1_PAD_CTRL register
to 1).

To achieve the desired wake-up interrupt delay on the LIS2DW12, it is essential to correctly configure both the WAKE_UP_DUR register value and the Output Data Rate (ODR), considering that the delay equals WAKE_UP_DUR × (1/ODR) × a multiplier defined by the WU_DUR[1:0] bits.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.