2020-01-16 09:10 AM
Hi, I am working with LSM6DS3TR sensor and need some advice on FIFO usage. I have followed sample code from the ST's GitHub page but still have some questions. I am using continuous-to-FIFO mode and tap interrupt.
//Set FIFO watermark to a multiple of a pattern
pattern_len = 6;
pattern_numbers = 300;
lsm6ds3tr_c_fifo_watermark_set(&lsm6ds3, pattern_numbers*pattern_len);
lsm6ds3tr_c_fifo_stop_on_wtm_set(&lsm6ds3, PROPERTY_ENABLE);
//Set FIFO mode to Stream-to-FIFO mode
lsm6ds3tr_c_fifo_mode_set(&lsm6ds3, LSM6DS3TR_C_STREAM_TO_FIFO_MODE);
//Enable FIFO watermark interrupt generation on INT1 pin
lsm6ds3tr_c_pin_int1_route_get(&lsm6ds3, &int_1_reg);
int_1_reg.int1_single_tap = PROPERTY_ENABLE;
lsm6ds3tr_c_pin_int1_route_set(&lsm6ds3, int_1_reg);
//Set FIFO sensor decimator
lsm6ds3tr_c_fifo_xl_batch_set(&lsm6ds3, LSM6DS3TR_C_FIFO_XL_NO_DEC);
lsm6ds3tr_c_fifo_gy_batch_set(&lsm6ds3, LSM6DS3TR_C_FIFO_GY_NO_DEC);
Solved! Go to Solution.
2020-01-17 06:16 AM
Hi @ASoni.2 , let me try to answer to some of your questions:
Regards
2020-01-17 06:16 AM
Hi @ASoni.2 , let me try to answer to some of your questions:
Regards
2020-01-20 06:38 AM
Hi @Eleon BORLINI , Thank you for your answer. I have managed to get maximum number of samples supported by FIFO.
Kind regards