cancel
Showing results for 
Search instead for 
Did you mean: 

Testing SRAM

steffen23
Associate
Posted on May 28, 2010 at 11:48

Testing SRAM

2 REPLIES 2
picguy2
Associate II
Posted on May 17, 2011 at 13:52

Clearly you can’t be using the stack when doing arbitrary writes in the stack area.  Memory testing is best performed on startup or standalone.  In either case interrupts are disabled.  

Method 1: Don’t use the stack until your memory test completes.  Note: on ARM processors you can use subroutines but use assembly, not C.  You don’t want compiler generated stack usage.

Method 2: Put your stack in high memory while testing low memory.  Then put your stack in low memory and test high memory.  C can then be used.

Processors and internal memory are quite good these days.  A trick I used in the past may not be needed but it’s not a bad idea to check for stuck addressing bits.  Write a 3 word (or 3 half word or 3 byte) repeating pattern into the RAM you are testing.  Verify the pattern.  Do the same for the complement of the pattern.  Any stuck address line will cause a bad compare.
Andrew Neil
Evangelist
Posted on May 17, 2011 at 13:52

Note that simplistic memory tests are apt to miss faults!

See 

http://www.netrino.com/Embedded-Systems/How-To/Memory-Test-Suite-C

 for a discussion of the types of faults that can occur in memory systems, and some tests to catch them all!