I played a little bit with the ADXL372 FIFO and i am stuck in few issues.
I have setup FIFO to generate interrupt when it has more than 150 samples (i.e. set FIFO_SAMPLES to 0x96 for 50 3-axis samples).
1st Issue: As i am reading 50 complete sets of 3 axis data every-time, so i expect the second byte of the FIFO data to indicate the series start bit, but sometimes, i get the start indicator in the 2nd byte, sometime in 4th and sometimes in 6th. I believe the first sample should include the start byte as i start reading from the start byte and always read set of 3 samples.
2nd Issue: Sometimes, out of 50 sample sets, only a first few samples would be good, rest would be just garbage data. Sometimes, all 150 samples are good, sometime 140 samples are good, sometimes just 10 samples are good and rest of the samples does not have Series Start Indicator, which confirms me that it is not real data.
3rd Issue: Sometime after getting the FIFO_FULL interrupt, when i read the FIFO_ENTRIES register, the register values are quite less instead of 150, like 30-40, whereas i would expect to get more than 150 samples. The next time, the interrupt comes really quickly, which also gives me a hint that the FIFO actually had more than 30-40 samples, but somehow FIFO_ENTRIES register returned smaller number.
4th Issue: When i read the STATUS Register, sometime i get 0x47 and sometime i get 0x44. 0x44 means that FIFO_RDY bit is zero, which means that the FIFO did not have any valid sample. But i am reading this register after FIFO_FULL interrupt has been raised and i was able to read all 150 samples, so FIFO_RDY bit being zero raises questions.
Please suggest, if you have any ideas to fix these issues.
It's a duplicate thread so let me close it. The discussion is continued here,
IMHO this is not a duplicate we are facing the same issue, we are enabling the fifo with watermark say 501 and reading the fifo-3 every watermark interrupt and some times we see exactly those issues and untill now we did not get an explanation of what could be the root cause.
Sorry for the late reply, which issue do you refer to? Let's say you have FIFO sample that is set to 501 and read data based on watermark interrupt. What's the ODR speed you are at? If it's 6400Hz, can you try lower it to 3200Hz and pull FIFO data out all at one when the FIFO_full(watermark) interrupt triggers and see if the issue is still there.