Maxim Integrated / Mbed OS MAX5719BOB_Serial_Tester

Dependencies:   MaximTinyTester CmdLine MAX5719 USBDevice

Revision:
32:016a142143a5
Parent:
31:9cb570b0685d
Child:
33:2c675744a01b
diff -r 9cb570b0685d -r 016a142143a5 Test_Main_MAX5719.cpp
--- a/Test_Main_MAX5719.cpp	Fri Jun 11 11:46:23 2021 -0700
+++ b/Test_Main_MAX5719.cpp	Fri Jun 11 16:47:20 2021 -0700
@@ -1892,7 +1892,7 @@
 //   | 0x0001 //  -- halt-on-first-failure configuration flag
 //   | 0x0002 //  -- repeat-until-failure configuration flag
    | 0x0004 // CODE_LOAD -- Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default)
-   | 0x0008 // DACCodeOfVoltage -- Verify function DACCodeOfVoltage (enabled by default)
+   | 0x0008 // DACCodeOfVoltage -- Verify function DACCodeOfVoltage (enabled by default) (no run on button)
    ;
 
 //--------------------------------------------------
@@ -1909,7 +1909,7 @@
 #endif
 
 // SelfTest group DACCodeOfVoltage description:
-// Verify function DACCodeOfVoltage (enabled by default)
+// Verify function DACCodeOfVoltage (enabled by default) (no run on button)
 // SelfTestGroupEnable bitmask 0x0008
 // self test command:  
 // . run=0x0008
@@ -1928,7 +1928,7 @@
 //        | 0x0001 //  -- halt-on-first-failure configuration flag
 //        | 0x0002 //  -- repeat-until-failure configuration flag
         | 0x0004 // CODE_LOAD -- Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default)
-//        | 0x0008 // DACCodeOfVoltage -- Verify function DACCodeOfVoltage (enabled by default)
+//        | 0x0008 // DACCodeOfVoltage -- Verify function DACCodeOfVoltage (enabled by default) (no run on button)
     ;
     SelfTest(cmdLine_serial);
 }
@@ -1947,7 +1947,7 @@
         | 0x0001 //  -- halt-on-first-failure configuration flag
         | 0x0002 //  -- repeat-until-failure configuration flag
         | 0x0004 // CODE_LOAD -- Verify function CODE_LOAD vs platform AIN0 analog input (enabled by default)
-//        | 0x0008 // DACCodeOfVoltage -- Verify function DACCodeOfVoltage (enabled by default)
+//        | 0x0008 // DACCodeOfVoltage -- Verify function DACCodeOfVoltage (enabled by default) (no run on button)
     ;
     SelfTest(cmdLine_serial);
 }
@@ -1981,6 +1981,10 @@
 
     // repeat-until-failure logic
     repeatUntilFailure:
+    cmdLine.serial().printf("\r\n. run=0x%4.4x", SelfTestGroupEnable);
+    if ((SelfTestGroupEnable & 0x0003) == 0x0000) { cmdLine.serial().printf("\r\n. runall=0x%4.4x", SelfTestGroupEnable &~ 0x0003); }
+    if ((SelfTestGroupEnable & 0x0003) == 0x0001) { cmdLine.serial().printf("\r\n. runfail=0x%4.4x", SelfTestGroupEnable &~ 0x0003); }
+    if ((SelfTestGroupEnable & 0x0003) == 0x0003) { cmdLine.serial().printf("\r\n. loopfail=0x%4.4x", SelfTestGroupEnable &~ 0x0003); }
     // Report number of pass and number of fail test results
     tinyTester.Report_Summary();
     //
@@ -3150,7 +3154,7 @@
     } // if (SelfTestGroupEnable & 0x0004)
 #endif // MAX5719_SELFTEST_CODE_LOAD // group CODE_LOAD
 
-    // @test group DACCodeOfVoltage // Verify function DACCodeOfVoltage (enabled by default)
+    // @test group DACCodeOfVoltage // Verify function DACCodeOfVoltage (enabled by default) (no run on button)
     // @test group DACCodeOfVoltage tinyTester.blink_time_msec = 20 // quickly speed through the software verification
     // docTest_item['actionType'] = 'assign-propname-value'
     // docTest_item['group-id-value'] = 'DACCodeOfVoltage'
@@ -6423,29 +6427,24 @@
         {
             // . -- SelfTest
             cmdLine.serial().printf("SelfTest()");
-            // TODO parse "run?" prints SelfTestGroupEnable bitmask and immediately exits
             // parse "run=0x0020" set SelfTestGroupEnable bitmask and run tests
             if (cmdLine.parse_int_dec("run", SelfTestGroupEnable))
             {
-                cmdLine.serial().printf("\r\nrun=0x%4.4x", SelfTestGroupEnable);
             }
             // parse "runfail=0x0020" -- set SelfTestGroupEnable and run tests, halt on first failure
             if (cmdLine.parse_int_dec("runfail", SelfTestGroupEnable))
             {
                 SelfTestGroupEnable |= 1;
-                cmdLine.serial().printf("\r\nrun=0x%4.4x", SelfTestGroupEnable);
             }
             // parse "runall=0x0020" -- run selected tests, continue even if tests fail
             if (cmdLine.parse_int_dec("runall", SelfTestGroupEnable))
             {
                 SelfTestGroupEnable &=~ 1;
-                cmdLine.serial().printf("\r\nrun=0x%4.4x", SelfTestGroupEnable);
             }
             // parse "loopfail=0x0020" -- run selected tests, repeat until first failure
             if (cmdLine.parse_int_dec("loopfail", SelfTestGroupEnable))
             {
                 SelfTestGroupEnable |= 3;
-                cmdLine.serial().printf("\r\nrun=0x%4.4x", SelfTestGroupEnable);
             }
             SelfTest(cmdLine);
         }