Part Number: TMS320F28379D
Hello all,
I am trying to test SDRAM w/r speed. F28397D run at 200Mhz and I set a SDRAM buffer size as 250000 (mem_size=250000 ), using a gpio to indicator the begin and end of the 'sdram_read_write_speed_benchmark()'. However, the results shows the w/r takes 268ms, i.e.3.7Hz.
is there anything I missed? the speed is much lower than the TI docs.
The setting and test codes are as follows:
..
GPIO_WritePin(GPIO_2, 1);
temp_sdram_test = sdram_read_write_speed_benchmark(250000); /// 1: error; 0: pass
GPIO_WritePin(GPIO_2, 0);
...
// Configure to run EMIF1 on half Rate (EMIF1CLK = CPU1SYSCLK/2)
//
EALLOW;
ClkCfgRegs.PERCLKDIVSEL.bit.EMIF2CLKDIV = 0x1;
EDIS;
char sdram_read_write_speed_benchmark(Uint32 mem_size)
{
Uint32 i;
// Fill far memory buffer with data
mem_wdl = 0;
for (i=0; i < mem_size; i++)
{
memcpy_fast_far((g_ulSDRAMBuf + i), &mem_wdl, 2);
}
//
// Read far memory buffer into local buffer and verify data
for (i=0; i < mem_size; i++)
{
memcpy_fast_far((g_local_buffer+0), (g_ulSDRAMBuf + i), 2);
}
return(0);
}