FLEXSPI IPRXFSTS while reading

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

FLEXSPI IPRXFSTS while reading

跳至解决方案
1,961 次查看
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?

标签 (1)
0 项奖励
回复
1 解答
1,937 次查看
Harry_Zhang
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 项奖励
回复
2 回复数
1,938 次查看
Harry_Zhang
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 项奖励
回复
1,930 次查看
gavin5342
Contributor III

Thank you for the help.

0 项奖励
回复