FLEXSPI_ReadBlocking() hangs waiting for FIFO to clear up

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

FLEXSPI_ReadBlocking() hangs waiting for FIFO to clear up

Jump to solution
924 Views
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 Kudos
Reply
1 Solution
918 Views
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

View solution in original post

0 Kudos
Reply
2 Replies
919 Views
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 Kudos
Reply
910 Views
mjpovi
Contributor III
Thanks! If DMA is used instead of IP for Flexspi transfer, is there another limit ?
0 Kudos
Reply