Hi @Dhruvit ,
To reproduce the error, I'm reading in loop a big i2c command response.
The read frame size is of 2069 bytes, split in chunk of 256 bytes.
The occurrence rate is maybe 1/10000 but can vary. I have not identified what can increase or reduce it.
About the missing byte, it is lost. There are other bytes in the FIFO but not the one just after the previous data when the next ISR is triggered
For example:
If I spy the i2c bus I can see "0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F 0x20" (all bytes are there)
and in parallel in the driver I have::
* Write Read command in the TXFIFO and set RXWATER to 7
* ISR called with "0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F 0x10" in the FIFO.
* Set RXWATER set to 7
* ISR called with "0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19" in the FIFO. Here byte 0x11 is missing at the beginning of the FIFO but was visible on i2c bus
* Set RXWATER to 7 to get remaining bytes as we are expecting to get 20 bytes
* ISR is never called because there is only 7 bytes in the FIFO "0x1A 0x1B 0x1C 0x1D 0x1E 0x1F 0x20"
I have never seen it when I'm issuing a single read command and it seems to only appear when I'm queuing read commands in the TXFIFO to read more than 256 bytes. I'm only queuing a read command when more than 128 bytes of the previous read has been completed, so at worst there is one read command in the TXFIFO and one being processed.
Regards