I would like to know if following method for RAM check is correct:
UINT16 ramTest(void)
{
volatile UINT32 Addr;
for (Addr = 0x1C00; Addr < 0x5BE0; Addr+=4)
{
__data20_write_long(Addr,0xFFFFFFFF);
if((__data20_read_long(Addr))!= 0xFFFFFFFF)
{
return 1;
}
__data20_write_long(Addr,0xAAAAAAAA);
if((__data20_read_long(Addr))!= 0xAAAAAAAA)
{
return 1;
}
__data20_write_long(Addr,0x55555555);
if((__data20_read_long(Addr))!= 0x55555555)
{
return 1;
}
__data20_write_long(Addr,0x00000000);
if((__data20_read_long(Addr))!= 0x00000000)
{
return 1;
}
}
return (0);
} /* ram memory Test*/