cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSL: Using inactivity interrupt without the auto-decrease of the sample rate

Omnia .
Associate II
Posted on June 05, 2017 at 18:20

Hi,

I am using the LSM6DSL with a SMT32L476. My question is in relation to the Sleep/inactivity interrupt.

I am able to use the LSM6DSL in both sleep and wake up interruption.

However is it possible to use this interrupt (Sleep/inactivity) and disable the automatic decrease of the accelerometer sampling rate to 13 Hz option.

I tried to set TAP_CFG (58h) to 0x80 (INACT_EN = b00) but the interrupts are not generated anymore.

Can someone please tell me if it is possible and if it is how to ?

Thanks,

#lsm6dsl #inactivity ##interrupt
2 REPLIES 2
Miroslav BATEK
ST Employee
Posted on June 06, 2017 at 14:00

The reason to use inactivity function is to reduce the power consumption by decreasing the sampling rate, so it doesn't make sense to disable this sampling rate reduction. You can use wake-up interrupt for activity detection.

- Write 90h to TAP_CFG // Enable interrupts and apply high-pass digital filter; latched // mode disabled

- Write 00h to WAKE_UP_DUR // No duration

- Write 02h to WAKE_UP_THS // Set wake-up threshold

- Write 20h to MD1_CFG // Wake-up interrupt driven to INT1 pin

Posted on June 06, 2017 at 14:21

Hi Miroslav B,

Thanks for having time to answer to me.

I read in permanence data (208Hz) from accelerometers sensors (used as Hub too to add various other sensors)

When an inactivity detection occurred (From accelerometer) I have to manage my algorithms which use the data from sensors first. In certain case I don't have to 'accept' this sleep mode even if it is occurred (depending of Uc and user state). By managing myself the sampling rate of the accelerometer I can do whatever I want.

Is there any way to disable this extra feature (Auto decreasing the sample rate) but still use the inactivity detection?

I don't have any problem with the wake up activity. Every thing works as I expected.

Thanks