2010-05-28 02:48 AM
Testing SRAM
2011-05-17 04:52 AM
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.2011-05-17 04:52 AM
Note that simplistic memory tests are apt to miss faults!
Seehttp://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!