cancel
Showing results for 
Search instead for 
Did you mean: 

[LSM6DSL] strange values from fifo

jjo.2
Associate II

I am using lsm6dsl sensor.

using fifo, we continue to receive accel, gyro, and timestamp&step information in units of 18 bytes, but intermittently strange values continue to come in. Can you tell me why?

I think the order of the data accumulated in fifo is broken, can it be like that?

All ODRs were same equally.

configuration :

  • XL_ODR_208Hz
  • GY_ODR_208Hz
  • FIFO_208Hz
  • 16g, 500dps
  • XL_ANA_BW_1k5Hz
  • LOW_NOISE_LP_ODR_DIV_100
  • HP_65mHz_LP1_NORMAL
  • BDU Enable

/* Output log: TIMESTAMP count */ 

t[0][0]=473000

t[18][7]=473193

t[36][14]=473386

t[54][21]=473579

t[72][28]=473773

t[90][35]=473966

t[108][42]=472806

t[0][0]=1023    <- abnormal

t[18][7]=16777215 <- abnormal

t[36][14]=767   <- abnormal

t[54][21]=255   <- abnormal

t[72][28]=16776704 <- abnormal

t[90][35]=473966  

t[0][0]=475319

t[18][7]=475512

t[36][14]=475705

t[54][21]=475899

t[72][28]=476092

t[90][35]=476285

4 REPLIES 4
Eleon BORLINI
ST Employee

Hi @jjo.2​ ,

Can you check please if your code is consistent with the one on Github for the FIFO acquisition? It is available for the LSM6DSM, but it is equivalent at LSM6DSL device for this purpose --> lsm6dsm_read_fifo.c

-Eleon

jjo.2
Associate II

In the example code below, it read fifo as many as the number of patterns through the lsm6dsm_fifo_raw_data_get() function, but my code is reading at once. Can there be a problem in this case?

/* example code - lsm6dsm_read_fifo.c */

while (num_pattern-- > 0) {

lsm6dsm_fifo_raw_data_get(&dev_ctx, data_raw_angular_rate.u8bit, 3 * sizeof(int16_t));

}

/* my code */

lsm6dsm_fifo_raw_data_get(&dev_ctx, data_raw_angular_rate.u8bit, num_pattern*3 * sizeof(int16_t));

In the example code below, it read fifo as many as the number of patterns through the lsm6dsm_fifo_raw_data_get() function, but my code is reading at once. Can there be a problem in this case?

/* example code - lsm6dsm_read_fifo.c */

while (num_pattern-- > 0) {

lsm6dsm_fifo_raw_data_get(&dev_ctx, data_raw_angular_rate.u8bit, 3 * sizeof(int16_t));

}

/* my code */

lsm6dsm_fifo_raw_data_get(&dev_ctx, data_raw_angular_rate.u8bit, num_pattern*3 * sizeof(int16_t));

@Eleon BORLINI​ 

In the example code below, it read fifo as many as the number of patterns through the lsm6dsm_fifo_raw_data_get() function, but my code is reading at once. Can there be a problem in this case?

/* example code - lsm6dsm_read_fifo.c */

while (num_pattern-- > 0) {

lsm6dsm_fifo_raw_data_get(&dev_ctx, data_raw_angular_rate.u8bit, 3 * sizeof(int16_t));

}

/* my code */

lsm6dsm_fifo_raw_data_get(&dev_ctx, data_raw_angular_rate.u8bit, num_pattern*3 * sizeof(int16_t));