FLEXSPI_ReadBlocking() hangs waiting for FIFO to clear up

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

FLEXSPI_ReadBlocking() hangs waiting for FIFO to clear up

跳至解决方案
1,055 次查看
mjpovi
Contributor III

For MIMXRT1064,  In performing a QSPI / FLEXSPI read operation from a NOR flash device with number of bytes to read greater than 48K or 64K or larger, FLEXSPI_ReadBlocking() hangs inside its while loop waiting for room in the FIFO (code snipped from SDK, below).  

My question is, is there a limit to the number of bytes to read via FLEXSPI due to the FIFO ?  If yes, what is that value and is it configurable ?

/* Send data buffer */
while (0U != size)
{
if (size >= 8U * rxWatermark)
{
/* Wait until there is room in the fifo. This also checks for errors. */ <<<<< Runs here 'forever'
while (0U == ((status = base->INTR) & (uint32_t)kFLEXSPI_IpRxFifoWatermarkAvailableFlag))
{
result = FLEXSPI_CheckAndClearError(base, status);

 

0 项奖励
回复
1 解答
1,049 次查看
jay_heng
NXP Employee
NXP Employee

RX FIFO size is 128bytes. You should never trigger a read command with data size larger than IP RX FIFO size. because most flash doesn't support SCLK stop feature.

SCLK_Stop.PNG

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,050 次查看
jay_heng
NXP Employee
NXP Employee

RX FIFO size is 128bytes. You should never trigger a read command with data size larger than IP RX FIFO size. because most flash doesn't support SCLK stop feature.

SCLK_Stop.PNG

0 项奖励
回复
1,041 次查看
mjpovi
Contributor III
Thanks! If DMA is used instead of IP for Flexspi transfer, is there another limit ?
0 项奖励
回复