[En-Nut-Discussion] External Ram problem in Ethernut1.3H
Harald Kipp
harald.kipp at egnite.de
Mon Dec 3 10:15:23 CET 2012
Hi Ayman,
On 01.12.2012 17:16, Ayman Hendawy wrote:
> When I run basemon, I get that message "External RAM Test... 0 bytes", when
> I pressed "S- SRAM Read/Write", I get nothing and when I pressed any key it
> print "No RAM at at 0x8000".
This function can be used to check the memory bus lines with an
oscilloscope or logic analyzer. Intentionally there is no output.
> when I repeat the above steps many times it print the same value, which is
> 1543, which mean I succeed in write and read from SRAM, and read the same
> data many times, but I can't understand why I can't read the same value
> that I have written "7777".
Testing RAM isn't trivial. There are many possible failures like stuck
data or address lines. Without proper measurement equipment it is almost
impossible to fix it.
Note, that even if there is no SRAM attached at all, you may still get
the same value back during read, which had been written before. This is
because on read the data bus changes to z-state and may remain in the
state that had been forced during the previous write.
Btw., you don't need any function at all. Using
unsigned char *sram = NULL;
will create an array on the complete memory and you can simply check
each location and bit pattern of the external RAM, e.g.
for (adr = 0x1100; adr < 0x8000; adr++) {
sram[adr] = 0x01;
}
But, as I said, without measurement it is quite difficult or impossible
to locate the problem.
Regards,
Harald
More information about the En-Nut-Discussion
mailing list