I am using an RT1052 and transferring 1056 byte buffers from FlexSPI to internal/FlexRAM OCRAM using the EDMA through the IP port. I find that the first 266 bytes get sent as quickly as possible (ie the RT1052 doesn't stop SCK). After 266 bytes, SCK stops for 17 periods every 8th byte.
My clocks are:
AHB_CLK_ROOT = 600MHz (from PLL1)
IPG_CLK_ROOT = 150MHz (IPG_PODF = 3 / divide by 4)
FLEXSPI_CLK_ROOT = 60MHz (from PLL3[PFD0], PLL3[PFD0] = 360MHz, FLEXSPI_PODF = 5 = div6)
My application is running from FlexRAM DTCM.
The EDMA config for this transfer is:
srcAddr = 0x402a8100
destAddr = 0x20222994
srcTransferSize = kEDMA_TransferSize1Bytes
destTransferSize = kEDMA_TransferSize1Bytes
srcOffset = 1
destOffset = 1
minorLoopBytes = 8
majorLoopBytes = 132
It looks like the EDMA is not emptying the IP RX FIFO quickly enough. Is my EDMA configuration incorrect? This is all based on the flexspi_edma example from the SDK.
Solved! Go to Solution.
Problem was *TransferSize. Example and default is 1Byte which is slow. Using this method:
FLEXSPI_TransferUpdateSizeEDMA(base, &handle, kFLEXSPI_EDMAnSize8Bytes); means that there are no more stalls and FlexSPI operates with maximum possible bandwidth.
Problem was *TransferSize. Example and default is 1Byte which is slow. Using this method:
FLEXSPI_TransferUpdateSizeEDMA(base, &handle, kFLEXSPI_EDMAnSize8Bytes); means that there are no more stalls and FlexSPI operates with maximum possible bandwidth.