FLEXSPI IPRXFSTS while reading

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FLEXSPI IPRXFSTS while reading

Jump to solution
326 Views
gavin5342
Contributor III

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?

Labels (1)
0 Kudos
1 Solution
302 Views
HangZhang
NXP Employee
NXP Employee

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

View solution in original post

0 Kudos
2 Replies
303 Views
HangZhang
NXP Employee
NXP Employee

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

0 Kudos
295 Views
gavin5342
Contributor III

Thank you for the help.

0 Kudos