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

Revision:
1:b2b9d3920781
Parent:
0:947ff5fa24c6
--- 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);