On 10.01.2023 21:40:16, Thomas.Kopp@microchip.com wrote: > > The correct message counter is 0x100, the wrong one 0x120. That's 2x > > FIFO size. I'd like to know when the FIFO head is wrong for the first > > time, one that results in a data transfer where "old" FIFO contents is > > read. I haven't dumped any data yet. I got a chip-delta == 4 error. > Not sure what you mean. Do you want the message counter at that point > in time? I want to know the chip tail where the driver reads the first time old data. For example in this trace: | do_rxif_analyze: ct=0x07 ch=0x08 cd=0x01 rt=0x00000427 rh=0x00000428 rd=0x01 | TFERFFIF Receive FIFO Full Interrupt Flag | TFHRFHIF Receive FIFO Half Full Interrupt Flag | TFNRFNIF x Receive FIFO Not Empty Interrupt Flag | -------------------------------------------------------------------------------- | do_rxif_analyze: ct=0x08 ch=0x09 cd=0x01 rt=0x00000428 rh=0x00000429 rd=0x01 | TFERFFIF Receive FIFO Full Interrupt Flag | TFHRFHIF Receive FIFO Half Full Interrupt Flag | TFNRFNIF x Receive FIFO Not Empty Interrupt Flag | -------------------------------------------------------------------------------- | do_rxif_analyze: ct=0x09 ch=0x0a cd=0x01 rt=0x00000429 rh=0x0000042a rd=0x01 | TFERFFIF Receive FIFO Full Interrupt Flag | TFHRFHIF Receive FIFO Half Full Interrupt Flag | TFNRFNIF x Receive FIFO Not Empty Interrupt Flag chip delta is 1, so probably OK. | -------------------------------------------------------------------------------- | do_rxif_analyze: ct=0x0a ch=0x0e cd=0x04 rt=0x0000042a rh=0x0000042e rd=0x04 | TFERFFIF Receive FIFO Full Interrupt Flag | TFHRFHIF Receive FIFO Half Full Interrupt Flag | TFNRFNIF x Receive FIFO Not Empty Interrupt Flag chip delta is 4. Are all RX objects (0xa, 0xb, 0xc and 0xd) valid data? | -------------------------------------------------------------------------------- | do_rxif_analyze: ct=0x0e ch=0x0c cd=0x0e rt=0x0000042e rh=0x0000043c rd=0x0e | TFERFFIF Receive FIFO Full Interrupt Flag | TFHRFHIF x Receive FIFO Half Full Interrupt Flag | TFNRFNIF x Receive FIFO Not Empty Interrupt Flag Are the read RX objects are all valid data? | -------------------------------------------------------------------------------- | do_rxif_analyze: ct=0x0c ch=0x0c cd=0x10 rt=0x0000043c rh=0x0000044c rd=0x10 | TFERFFIF x Receive FIFO Full Interrupt Flag | TFHRFHIF x Receive FIFO Half Full Interrupt Flag | TFNRFNIF x Receive FIFO Not Empty Interrupt Flag We read the whole FIFO, is everything valid data? Probably not. Which RX FIFO object is the first "bad" one? | -------------------------------------------------------------------------------- Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |