Quick but comprehensive memory test for the LPC4088's 32MB of SDRAM. The demonstration program executes a single test pass, though it can be easily modified for multiple passes. If a memory error is detected, the test stops immediately and displays failed results. A single pass is performed in less than one second and every memory location contains unique data.

Dependencies:   EALib mbed

Files at this revision

API Documentation at this revision

Comitter:
loopsva
Date:
Tue Dec 31 18:04:26 2013 +0000
Parent:
0:947ff5fa24c6
Commit message:
Moved the memory test out of SDRAM initialization and into main() for user clarification.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 947ff5fa24c6 -r b2b9d3920781 main.cpp
--- a/main.cpp	Tue Dec 31 17:38:48 2013 +0000
+++ b/main.cpp	Tue Dec 31 18:04:26 2013 +0000
@@ -72,9 +72,6 @@
                 free(ptr[i]);
             }
             alloccount = 0;
-            uint32_t StartSeed = 0xbad1deaf;
-            int testresult = testSDRAM(StartSeed);
-            if(testresult) return(testresult);
             break;
         } else {
             alloccount++ ;
@@ -91,6 +88,9 @@
     pc.baud(460800);  
     pc.printf("\r\n\r\nLPC4088 SDRAM memory test\r\n");
     initSDRAM(); 
+    
+    uint32_t StartSeed = 0xbad1deaf;
+    int testresult = testSDRAM(StartSeed);
 
     while(1) {
         wait_ms(500);