I have an occasional (once in ~4000 reads) failure in my application using FLEXSPI to connect to an FPGA. The failure symptom is:
During a 2 byte read, IPRXFSTS[FILL] = 0 and IPRXFSTS[RDCNTR] = 1.
Do those status values mean that the FIFO did get filled but was subsequently read by a different task (possible as I am using FreeRTOS)?
Does RDCNTR keep track of all received data until the next time IPCMD[TRG] is written to kick off another transfer?
When a transfer is not a multiple of 8 bytes, do the final bytes increment FILL/RDCNTR anyway (that seems to be what I see) e.g.a 12 byte transfer would mean FILL=2?
解決済! 解決策の投稿を見る。
Hi @gavin5342
Thanks for your interest in NXP MIMXRT series.
1. During a 2 byte read, IPRXFSTS[FILL] = 0 and IPRXFSTS[RDCNTR] = 1.
Do those status values mean that the FIFO did get filled but was subsequently read by a different task (possible as I am using FreeRTOS)?
No, reading two bytes goes through two phases,
the first, when the data has been read back into RXFIFO and is awaiting further processing, IPRXFSTS[FILL] = 1 and IPRXFSTS[RDCNTR] = 0,
second, When data is poped once from RXFIFO, IPRXFSTS[FILL] = 0 and IPRXFSTS[RDCNTR] = 1.
2. Does RDCNTR keep track of all received data until the next time IPCMD[TRG] is written to kick off another transfer?
Yes, RDCRDCNTR will keep track of all received data until the next time IPCMD[TRG] is written to kick off another transfer.
3.When a transfer is not a multiple of 8 bytes, do the final bytes increment FILL/RDCNTR anyway (that seems to be what I see) e.g.a 12 byte transfer would mean FILL=2?
Yes, When the transmitted bytes are less than 16 bytes and greater than 8 bytes, the IPRXFSTS[FILL] = 2.
Best regards,
Hang
Hi @gavin5342
Thanks for your interest in NXP MIMXRT series.
1. During a 2 byte read, IPRXFSTS[FILL] = 0 and IPRXFSTS[RDCNTR] = 1.
Do those status values mean that the FIFO did get filled but was subsequently read by a different task (possible as I am using FreeRTOS)?
No, reading two bytes goes through two phases,
the first, when the data has been read back into RXFIFO and is awaiting further processing, IPRXFSTS[FILL] = 1 and IPRXFSTS[RDCNTR] = 0,
second, When data is poped once from RXFIFO, IPRXFSTS[FILL] = 0 and IPRXFSTS[RDCNTR] = 1.
2. Does RDCNTR keep track of all received data until the next time IPCMD[TRG] is written to kick off another transfer?
Yes, RDCRDCNTR will keep track of all received data until the next time IPCMD[TRG] is written to kick off another transfer.
3.When a transfer is not a multiple of 8 bytes, do the final bytes increment FILL/RDCNTR anyway (that seems to be what I see) e.g.a 12 byte transfer would mean FILL=2?
Yes, When the transmitted bytes are less than 16 bytes and greater than 8 bytes, the IPRXFSTS[FILL] = 2.
Best regards,
Hang
Thank you for the help.