AnsweredAssumed Answered

Axis X is not changing

Question asked by Ondrej Meca on Aug 14, 2017
Latest reply on Aug 21, 2017 by Babip Bipbop

Hi,

 

I'm using LSM6DSL and unable to operate X axis on accelerometer. The Y and Z axes give me the right results but X axis is stable at 32756 and changes only by 5 points. I have 4 devices with LSM6DSL and all behave same. Tested even without FIFO (same result). Because 4 devices do the same, I'm not sure of device fault.

 

Here is my setup:

/* Enable register address automatically incremented during a multiple byte
access with a serial interface. */
LSM6DSL_ACC_GYRO_W_IF_Addr_Incr(NULL, LSM6DSL_ACC_GYRO_IF_INC_ENABLED);

/* Enable BDU */
LSM6DSL_ACC_GYRO_W_BDU(NULL, LSM6DSL_ACC_GYRO_BDU_BLOCK_UPDATE );

 

// Low power enabled (XL_HM_MODE = 1)
LSM6DSL_ACC_GYRO_W_LowPower_XL(NULL, LSM6DSL_ACC_GYRO_LP_XL_DISABLED) ;

 

/* Scale selection. */
LSM6DSL_ACC_GYRO_W_FS_XL(NULL, LSM6DSL_ACC_GYRO_FS_XL_4g );

 

/* Set accelero FIFO decimation */
LSM6DSL_ACC_GYRO_W_DEC_FIFO_XL(NULL, LSM6DSL_ACC_GYRO_DEC_FIFO_XL_NO_DECIMATION);

/* Set FIFO ODR to highest value */
LSM6DSL_ACC_GYRO_W_ODR_FIFO(NULL, LSM6DSL_ACC_GYRO_ODR_FIFO_6600Hz);

 

/* Set FIFO_FULL on INT2 */
LSM6DSL_ACC_GYRO_W_FULL_FLAG_on_INT2(NULL, LSM6DSL_ACC_GYRO_INT2_FULL_FLAG_ENABLED);


/* Set FIFO watermark */
LSM6DSL_ACC_GYRO_W_FIFO_Watermark(NULL, FIFO_WATERMARK);

/* Set FIFO depth to be limited to watermark threshold level */
if(LSM6DSL_ACC_GYRO_W_STOP_ON_FTH(NULL, LSM6DSL_ACC_GYRO_STOP_ON_FTH_ENABLED);

 

/* Set ODR at 104Hz */
LSM6DSL_ACC_GYRO_W_ODR_XL(NULL, LSM6DSL_ACC_GYRO_ODR_XL_104Hz);

 

/* Set FIFO mode to Continuous */
LSM6DSL_ACC_GYRO_W_FIFO_MODE(NULL, LSM6DSL_ACC_GYRO_FIFO_MODE_DYN_STREAM_2);

 

Thanks

Ondrej Meca

Outcomes