NM500 TEST PGM

Dependencies:   NM500Lib_Socket NM500_Test_Socket SDFileSystem_Socket mbed

Revision:
18:ef02c87871b8
Parent:
17:c6ea9c132419
--- a/main.cpp	Mon Dec 17 09:32:13 2018 +0000
+++ b/main.cpp	Mon Oct 31 00:26:25 2022 +0000
@@ -69,12 +69,13 @@
 
 
 int main() { 
-    //pc.baud(115200);
+    pc.baud(115200);
 
     pc.printf("\nPress any key to start\n");
     int data = pc.getc();
     
     pc.printf("\nNM500 Test Board V1.0 \n");
+    
     //SPI Setting
     //time measure start
     
@@ -88,22 +89,24 @@
     //NM500 Init
     if(begin() == 0){
         pc.printf("\nNM500 Init\n");
+        pc.printf("\nTotal Neuron is %d ", countTotalNeurons());
     }
     else{
         error("IC Fail\n");
         
     } 
+    
     //connection Test
 
     Connection_test();
 
 
     
-    Cell_Test();
+    int m_test = Cell_Test();
     
     //Memory Test
- 
-    Memory_Test();
+    //중복 제거
+    //Memory_Test();
 
 
     forget();
@@ -293,7 +296,8 @@
         pc.printf("#2 NM500 Dist Register Fail\n");
         NM2++;
     }
-    if(Memory1 == 1){
+    if(Memory1 == 1 || m_test != 0){
+        pc.printf("Memory1 : %d, m_test : %d",Memory1,m_test);
         pc.printf("#1 Memory Fail\n");
         NM1++;
     }
@@ -313,7 +317,7 @@
     else
         pc.printf("Connection Test Pass\n");
     
-    if(Memory_fail == 1)
+    if(Memory_fail == 1 && m_test != 0)
         pc.printf("Memory Test Fail \n");
    else
         pc.printf("Memory Test Pass\n"); 
@@ -323,6 +327,7 @@
         pc.printf("#2 NM500 Function Test Fail\n");   
     if(NM1 == 0 && NM2 == 0)
         pc.printf("NM500 Function Test PASS\n");
+  
 
 //    pc.printf("POWER SAVE ON\n");
 //    write(NM_POWER_SAVE,0);