Test program running on MAX32625MBED. Control through USB Serial commands using a terminal emulator such as teraterm or putty.

Dependencies:   MaximTinyTester CmdLine MAX5171 USBDevice

Revision:
8:9f9f09e349b7
Parent:
7:bf501f8cb637
Child:
9:b09c02ca59db
--- a/main.cpp	Thu Jun 20 22:48:43 2019 +0000
+++ b/main.cpp	Fri Jun 21 08:35:25 2019 +0000
@@ -293,7 +293,7 @@
 //--------------------------------------------------
 // Support MAX5715BOB Breakout Board
 #ifndef APPLICATION_MAX5715
-#define APPLICATION_MAX5715 1
+#define APPLICATION_MAX5715 0
 #endif // APPLICATION_MAX5715
 #if APPLICATION_MAX5715 // header file
 #include "MAX5715.h"
@@ -315,7 +315,7 @@
 //--------------------------------------------------
 // Support MAX5171BOB Breakout Board
 #ifndef APPLICATION_MAX5171
-#define APPLICATION_MAX5171 0
+#define APPLICATION_MAX5171 1
 #endif // APPLICATION_MAX5171
 #if APPLICATION_MAX5171 // header file
 #include "MAX5171.h"
@@ -3490,12 +3490,12 @@
     //uint8_t (*fn_MAX5171_CODE_LOAD)(uint16_t dacCodeLsbs) = [](uint16_t dacCodeLsbs){ return g_MAX5171_device.CODE_LOAD(dacCodeLsbs); };
     //
     //double one_LSB = (g_MAX5171_device.VRef / 16383); // 14-bit DAC FS
-    tinyTester.err_threshold = (g_MAX5171_device.VRef / 16383); // 14-bit DAC FS
     // tinyTester.Wait_Output_Settling replaces wait_ms
     tinyTester.settle_time_msec = 250;
 
     g_MAX5171_device.VRef = 2.500;     // MAX5171 14-bit LSB = 0.00015V
     SelfTest_print_Vref(cmdLine);
+    tinyTester.err_threshold = (g_MAX5171_device.VRef / 16383); // 14-bit DAC FS
     //
     // tinyTester.FunctionCall_Expect replaces SelfTest_DACCodeOfVoltage_Expect
     tinyTester.FunctionCall_Expect("MAX5171.DACCodeOfVoltage", fn_MAX5171_DACCodeOfVoltage, 2.499847412109375, 0x3FFF);