cancel
Showing results for 
Search instead for 
Did you mean: 

Fifo full , fth interrupt not coming

thejas
Associate II

Requirement: FIFO_FULL / FTH interrupt on INT2

These are my sensor init

lsm6ds3_gy_data_rate_set(&dev_ctx, LSM6DS3_GY_ODR_OFF);
 
lsm6ds3_xl_power_mode_set(&dev_ctx,LSM6DS3_XL_NORMAL);
 
lsm6ds3_reset_set(&dev_ctx, PROPERTY_ENABLE);
 
lsm6ds3_xl_full_scale_set(&dev_ctx, LSM6DS3_4g);
 
lsm6ds3_block_data_update_set(&dev_ctx, PROPERTY_ENABLE);
 
lsm6ds3_fifo_watermark_set(&dev_ctx, (g_accel_odr*g_fifo_read_interval * pattern_len)+1); //781 samples
 
lsm6ds3_fifo_stop_on_wtm_set(&dev_ctx,PROPERTY_ENABLE);
 
lsm6ds3_fifo_mode_set(&dev_ctx, LSM6DS3_STREAM_MODE);
 
lsm6ds3_fifo_data_rate_set(&dev_ctx, LSM6DS3_FIFO_26Hz);
 
lsm6ds3_xl_data_rate_set(&dev_ctx, LSM6DS3_XL_ODR_26Hz);
 
  /* enable inactivity/activity */
 
  /*Set duration for Activity detection to 38.4 ms (= 1 * 1 / ODR_XL) */
 
  lsm6ds3_wkup_dur_set(&dev_ctx, 0x01);
 
  /*Set duration for Inactivity detection to 19.69 s (= 1 * 512 / ODR_XL)*/
 
  lsm6ds3_act_sleep_dur_set(&dev_ctx, 0x01);
 
  /* Set Activity/Inactivity threshold to 187.5 mg (= 3 * FS / 2^6) , FS=4g */
 
  lsm6ds3_wkup_threshold_set(&dev_ctx, 0x03);
 
  lsm6ds3_act_mode_set(&dev_ctx, PROPERTY_ENABLE);
 
  /*Enable interrupt generation on Inactivity INT2 pin */
 
  lsm6ds3_pin_int2_route_get(&dev_ctx, &int_2_reg);
 
//  int_2_reg.int2_inact_state = PROPERTY_ENABLE;
 
  int_2_reg.int2_fth = PROPERTY_ENABLE;
 
  lsm6ds3_pin_int2_route_set(&dev_ctx, &int_2_reg);
 
/*reset fifo*/
 
  fifo_reset(LSM6DS3_STREAM_MODE);

The problem is im not getting any fth interrupt. is there any steps missed in sensor init ?

Thanks in advance

0 REPLIES 0