Hello,
I'm trying to use the EMIF module of the RM48 using HalCoGen Vs 03.09.00 to use the 8MB SDRAM on the TMDXRM48HDK board.
After generation the code with the compiler TI v5.1.1[TIv5.1.5] and debugging with Code Composer Studio S 6.0 the value of the SDRAm is 0x00;
I followed the next steps:
Enable the EMIF module driver
Set VCLK3 to 55.00 MHZ, so the EMIF CLOCK is 55 MHz.
Enable the EMIF SDRAM
Calculate theSDRAM parameters:
EMIF CLK Freq 55MHz
EMIF CLK tc 18.18 ns
t(rfc) 63 ns
t(rp) 20 ns
t(rcd) 20ns
t(wr) 40 ns
t(ras) 42 ns
T(rc) 63 ns
t(rrd) 14 ns
t(xsr) 70 ns
Refresh period is 64 ms
Refresh cycles 4096
CAS Latency 3
Banks 4
Page size 256
Enable Gate off EMIF_CLK output
Generate code with HalCoGen
inserted in sys_link.cmd : SDRAM (RW) : origin=0x80000000 length=0x00800000
inseted in sys_main: emif_SDRAMInit();
void SDRAM_TEST (void)
{ volatile uint16 *pt = (volatile uint16*)0x80000000;
uint32 i;
uint16 k;
for(i=0;i<0xFF;i++)
{
*pt = 10 + i;
pt++;
}
pt= (volatile uint16*) 0x80000000;
k = *pt;
k++;
}
What I am doing wrong ?
Best regards,
Robert Huisken