Question
LSM6DSl edge-sensitive trigger mode
Hello,
I want to use edge-sensitive trigger mode to synchronize multiple sensors. In the code snippet you can see the relevant code for that. The FIFO buffer doesn't get filled, even though I have a PWM as trigger on the INT2 pin. The low-pass filter LPF2 is disabled. Any ideas?
lsm6dsl_fifo_xl_batch_set(&dev_ctx, LSM6DSL_FIFO_XL_NO_DEC); // no decimation
lsm6dsl_fifo_gy_batch_set(&dev_ctx, LSM6DSL_FIFO_GY_NO_DEC); // no decimation
/* FIFO ODR has to be equal or lower than accel and gyro odr */
/* F(odr) = MIN ( MAX(ODR_XL, ODR_G), ODR_FIFO ) */
lsm6dsl_fifo_data_rate_set(&dev_ctx, LSM6DSL_FIFO_833Hz);
lsm6dsl_fifo_watermark_set(&dev_ctx, PL_CONFIG_FIFO_FTH);
lsm6dsl_fifo_mode_set(&dev_ctx, LSM6DSL_STREAM_MODE);
/* Enable Edge-Sensitive Trigger Mode */
#if PL_CONFIG_HAS_EDGE_TRIGGER
lsm6dsl_den_polarity_set(&dev_ctx, LSM6DSL_DEN_ACT_HIGH);
lsm6dsl_sh_syncro_mode_set(&dev_ctx, LSM6DSL_EXT_ON_INT2_PIN);
lsm6dsl_fifo_write_trigger_set(&dev_ctx, LSM6DSL_TRG_SH_DRDY);
lsm6dsl_den_mode_set(&dev_ctx, LSM6DSL_EDGE_TRIGGER);
lsm6dsl_den_enable_set(&dev_ctx, LSM6DSL_STAMP_IN_GY_XL_DATA);
#endif
lsm6dsl_xl_data_rate_set(&dev_ctx, LSM6DSL_XL_ODR_833Hz);
lsm6dsl_gy_data_rate_set(&dev_ctx, LSM6DSL_GY_ODR_833Hz);