Question
How to configure an LSM6DSO to detect device motion?
Hi,
I want to configure the LSM6DSO to trigger an interrupt on INT2 when the device starts and stops moving.
I used the following configuration, but I can only detect taps on the vertical axis:
// LSM6DSO datasheet pg 74
// (00: stationary/motion-only interrupts generated, XL and gyro do not change;
tap_cfg2_reg.inact_en = 0;
// Enable interrupt
tap_cfg2_reg.interrupts_enable = 1;
// LSM6DSO datasheet pg 73
// Filter
tap_cfg0_reg.slope_fds = 0;
// Interrupt enable for movement
tap_cfg0_reg.sleep_status_on_int = 0;
// LSM6DSO datasheet pg 76-77
// Threshold
wake_up_ths_reg.wk_ths = 0x02; // TODO tune threshold here
// Duration
wake_up_dur_reg.wake_dur = 0x02; // TODO tune duration here
// Enable interrupt on INT2
md2_cfg_reg.int2_sleep_change = 1;Is it possible to have a latched signal on INT2 that stays high when the device is moving and low when it's static?
Thank you for your help,
Walter
