Requirement:Need to use only accelerometer in LSM6DS3 at 104 Hz in 2g full-scale mode and FIFO in Continuous mode.Interrupt should generate for every 320 msec.
Understanding:For every 1 sec there are 104 samples (104 X samples and 104 Y samples and 104 Z samples ,2bytes each). i.e,624 bytes in a sec.So to generate interrupt at 320 msec need to set FIFO threshold as 210bytes. INT1 pin is configured as interrupt. I2C protocol used
CTRL1_XL = 0x10; //operating at 2g mode and ODR is 104Hz
CTRL3_C = 0x64; // BDU=1,H_LACTIVE=1,IF_INC=1
CTRL4_C = 0x29 //STOP_ON_FTH =1 and INT2_on_INT1=1 and SLEEP_G=1
CTRL6_C = 0x10 //XL_HM_MODE =1
MASTER_CONFIG = 0x80 //DRDY_ON_INT1=1
INT1_CTRL = 0x08
FIFO_CTRL1 =210 bytes as threslod
FIFO_CTRL5 = 0x23 //FIFO ODR is set to 104 Hz and FIFO Continuous mode selected
Interrupt is not at all generated . Please letme know if anything is missed or anything to be added/ modified.
Any help greatly appreciated.