Currently I am working with esp32-s3-mini system which communicates with IIM-42352 accelerometer via SPI. My configurations are as follows:
*FIFO mode- stream to FIFO
*Packet size- 16 bytes
*Interrupt 1 triggers when FIFO element count passes watermark value.
*Interrupt 1 is in pulse mode and only routed to Watermark threshold condition.
I want to fill buffer half way, get an interrupt, then start reading whole buffer, while I am reading the buffer, it should continue to fill up and when it reaches end, it should start filling from the beginning, this way I should avoid loosing data. For starters I tried configuring buffer so it would work in FIFO to stream mode and put out high on INT1 when FIFO fills up to 112 samples. the problem I get is that interrupt is being triggered very often and on several conditions, even though I only sourced it to be held high on Watermark threshold. After reading Int1_Status reg I get these bits 00001100, which means that FIFO buffer passed threshold value (which is good) and some kind of Data ready interrupt is triggered:
I do not really know what this Data ready even does, because I do not use it and can't find any info on datasheet too. And if this Data_Rdy_Int is not triggering interrupt, what might? Watermark threshold should trigger INT1 interrupt once, after FIFO element count passes the Watermark value, if I am not reading the buffer, element count should always stay at full, only new data is over writing old one. What could cause these multiple interrupts? And what does Data ready mean? https://invensense.tdk.com/wp-content/uploads/2021/01/DS-000442-IIM-42352-TYP_v1.4.pdf