IMXRT SDRAM Performance Issue

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

IMXRT SDRAM Performance Issue

1,096 Views
maglash64
Contributor II

Hi,

I have a MIMXRT1160-EVK development board.

I created a demo project to test SDRAM performance, and the read/write performance is quite low.

Here are the parameters for the test.

Below is the SEMC init config

SEMC clock is 166.73 Mhz

ARM M7 Clock is 600Mhz

sdramconfig.csxPinMux = kSEMC_MUXCSX0;
sdramconfig.address = 0x80000000;
sdramconfig.memsize_kbytes = 2 * 32 * 1024; /* 64MB = 2*32*1024*1KBytes*/
sdramconfig.portSize = kSEMC_PortSize32Bit; /*two 16-bit SDRAMs make up 32-bit portsize*/
sdramconfig.burstLen = kSEMC_Sdram_BurstLen8;
sdramconfig.columnAddrBitNum = kSEMC_SdramColunm_9bit;
sdramconfig.casLatency = kSEMC_LatencyTwo;
sdramconfig.tPrecharge2Act_Ns = 15; /* tRP 15ns */
sdramconfig.tAct2ReadWrite_Ns = 15; /* tRCD 15ns */
sdramconfig.tRefreshRecovery_Ns = 70; /* Use the maximum of the (Trfc , Txsr). */
sdramconfig.tWriteRecovery_Ns = 2; /* tWR 2ns */
sdramconfig.tCkeOff_Ns = 42; /* The minimum cycle of SDRAM CLK off state. CKE is off in self refresh at a minimum period tRAS.*/
sdramconfig.tAct2Prechage_Ns = 40; /* tRAS 40ns */
sdramconfig.tSelfRefRecovery_Ns = 70;
sdramconfig.tRefresh2Refresh_Ns = 60;
sdramconfig.tAct2Act_Ns = 2; /* tRC/tRDD 2ns */
sdramconfig.tPrescalePeriod_Ns = 160 * (1000000000 / clockFrq);
sdramconfig.refreshPeriod_nsPerRow = 64 * 1000000 / 8192; /* 64ms/8192 */
sdramconfig.refreshUrgThreshold = sdramconfig.refreshPeriod_nsPerRow;
sdramconfig.refreshBurstLen = 1;
sdramconfig.delayChain = 2;

Below is the MPU configuration: (Caching and Buffering on)

MPU->RBAR = ARM_MPU_RBAR(9, 0x80000000U);
MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 1, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_64MB);

DCache and ICache are also enabled.

After running the test which transfers 1MiB from SDRAM to DTCM and back for read, these are the results that I got:

starting memtest!
write data..!
time for dtcm to sdram write: 7 ms bandwidth: 149.796571 MB/s
read data..!
time for sdram to dtcm read: 14 ms bandwidth: 74.898286 MB/s
time for sdram to sdram copy: 17 ms

This is far cry from what NXP application note AN12437 lists

maglash64_0-1662306320840.png

Here the write speed is over 320MBps and read is 111MBps.

How it this possible/achieved?

 

 

Labels (2)
0 Kudos
Reply
1 Reply

1,093 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @maglash64 ,

Can you share your testing project.

 

Regards,

Jing

0 Kudos
Reply