cancel
Showing results for 
Search instead for 
Did you mean: 

How long does it take for the interrupt1 signal to be raised once movement is initiated?

APipm.1
Associate II

I'm trying to understand the span of accuracy I can achieve in terms of movement detection, in different Lis2dw12 setups.

From my understanding, the LIS samples the axis acceleration values once every ODR (so if ODR corresponds to 1.6HZ, once every ~0.6 seconds. If ODR corresponds to 12.5Hz, once every 0.08 seconds etc), and if the threshold is exceeded for a set duration, the interrupt is asserted.

We set the wake_up_dur to 0x00, so that should mean- wake up on a single sample over the threshold.

How much time can I expect between the movement starting (assuming its starting past the movement threshold) and when a logical '1' can be measured on the interrupt lines?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @APipm.1​ ,

>> We set the wake_up_dur to 0x00, so that should mean- wake up on a single sample over the threshold.

You are right: as reported in the AN5038 application note, when the duration time is set to zero, the wake-up interrupt signal is generated for each X,Y,Z data exceeding the configured threshold. This duration is the minimum available, and it means that, if the X data, sampled at a certain ODR, exceeds the threshold, the interrupt is risen "just after". This timing is equal to 1/ODR, as described in the figure 9 of p.21 (which refers to the configuration with 00h in WAKE_UP_DUR). In case you would set 01h in the WAKE_UP_DUR, the duration of the event will have to last at least 1/ODR (so, basically 2 data above threshold), and the notification will be risen after 2/ODR from the mechanical event threshold overcome, for each axis.

0693W000008wQm9QAE.pngFor your interest, the internal oscillator of the device (the master clock) is above 4MHz, so this is the maximum theoretical delay from a bit to the next one. But of course the bottle-neck at the output is the ODR granularity.

Let me please know if I well understood your point.

-Eleon

View solution in original post

3 REPLIES 3
Eleon BORLINI
ST Employee

Hi @APipm.1​ ,

>> We set the wake_up_dur to 0x00, so that should mean- wake up on a single sample over the threshold.

You are right: as reported in the AN5038 application note, when the duration time is set to zero, the wake-up interrupt signal is generated for each X,Y,Z data exceeding the configured threshold. This duration is the minimum available, and it means that, if the X data, sampled at a certain ODR, exceeds the threshold, the interrupt is risen "just after". This timing is equal to 1/ODR, as described in the figure 9 of p.21 (which refers to the configuration with 00h in WAKE_UP_DUR). In case you would set 01h in the WAKE_UP_DUR, the duration of the event will have to last at least 1/ODR (so, basically 2 data above threshold), and the notification will be risen after 2/ODR from the mechanical event threshold overcome, for each axis.

0693W000008wQm9QAE.pngFor your interest, the internal oscillator of the device (the master clock) is above 4MHz, so this is the maximum theoretical delay from a bit to the next one. But of course the bottle-neck at the output is the ODR granularity.

Let me please know if I well understood your point.

-Eleon

APipm.1
Associate II

Hi Eleon!

Thank you for the reply!

So, for a given wake-up event which happens some-when between two sample events, we have up to 1/ODR seconds of unknown error time between the movement event and when it was sampled, plus 1/ODR seconds (constant) until the Interrupt is raised. I'm ignoring the minuscule offset caused by the internal clock working at 4MHz.

Is that a fair statement?

Hi @APipm.1​ ,

ya, it is basically correct!

If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster. 

-Eleon