cancel
Showing results for 
Search instead for 
Did you mean: 

lsm6dv320x odr-triggered mode not working

rulmer
Visitor

Hello, I'm trying to use ODR-triggered to get data aligned with my clock. I'm sending a square wave 50% duty cycle period 2000ms over INT2 pin, yet when I poll the IMU every 50 ms the accel and gyro data changes, even though it should be aligned to the edges every 1000 ms.

I've double checked the registers to confirm they are correct and have an analyzer attached to verify INT2 pin is being sent signals. 

// init.c
lsm6dsv320x_block_data_update_set(&data->ctx, PROPERTY_ENABLE);
lsm6dsv320x_xl_data_rate_set(&data->ctx, LSM6DSV320X_ODR_OFF);
lsm6dsv320x_gy_data_rate_set(&data->ctx, LSM6DSV320X_ODR_OFF);
lsm6dsv320x_xl_mode_set(&data->ctx, LSM6DSV320X_XL_ODR_TRIGGERED_MD);
lsm6dsv320x_gy_mode_set(&data->ctx, LSM6DSV320X_GY_ODR_TRIGGERED_MD);
lsm6dsv320x_xl_full_scale_set(&data->ctx, LSM6DSV320X_2g);
lsm6dsv320x_gy_full_scale_set(&data->ctx, LSM6DSV320X_2000dps);
lsm6dsv320x_xl_data_rate_set(&data->ctx, LSM6DSV320X_ODR_AT_240Hz);
lsm6dsv320x_gy_data_rate_set(&data->ctx, LSM6DSV320X_ODR_AT_240Hz);
// read.c
// called every 50 ms
lsm6dsv320x_acceleration_raw_get(&data->ctx, data->accel);
lsm6dsv320x_angular_rate_raw_get(&data->ctx, data->gyro);

// every 1000 ms the INT2 is sent HIGH, then 1000 ms later sent LOW, alternating

rulmer_0-1769011277205.png

0 REPLIES 0