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

Dependencies:   MaximTinyTester CmdLine MAX541 USBDevice

Revision:
73:879578472009
Parent:
72:40feab5fd579
Child:
74:f4f969c9a7a9
--- a/MAX11043/MAX11043.cpp	Sat Feb 22 00:10:47 2020 +0000
+++ b/MAX11043/MAX11043.cpp	Sat Feb 22 01:04:36 2020 +0000
@@ -47,6 +47,17 @@
 #ifndef MAX11043_EOC_INTERRUPT_POLLING
 #define MAX11043_EOC_INTERRUPT_POLLING 0
 #endif // MAX11043_EOC_INTERRUPT_POLLING
+//--------------------------------------------------
+// Diagnostic: Use MAX32625MBED pin D5 as DigitalOut EOC#-detected
+#ifndef MAX11043_ScopeTrigger_MAX32625MBED_D5
+#define MAX11043_ScopeTrigger_MAX32625MBED_D5 1
+#endif // MAX11043_ScopeTrigger_MAX32625MBED_D5
+#if MAX11043_ScopeTrigger_MAX32625MBED_D5
+// Diagnostic: Use MAX32625MBED pin D5 as DigitalOut EOC#-detected
+#define D5 P0_5
+// WIP MAX11043 interrupt EOC echo - moving DigitalOut ScopeTrigger to global scope, it compiles but there is no activity on scope
+// DigitalOut ScopeTrigger(D5);
+#endif // MAX11043_ScopeTrigger_MAX32625MBED_D5
 
 // Device Name = MAX11043
 // Device Description = 200ksps, Low-Power, Serial SPI 24-Bit, 4-Channel, Differential/Single-Ended Input, Simultaneous-Sampling SD ADC
@@ -236,13 +247,19 @@
     // VERIFIED: if DO NOTHING inside interrupt service routine, no crash
 #if 1
     // VERIFIED: GPIO PIN pulse in response to EOC# falling edge, no crash on HH, no missed pulses
-    // Use MAX32625MBED pin D5 as DigitalOut EOC#-detected
-#define D5 P0_5
+#if MAX11043_ScopeTrigger_MAX32625MBED_D5
+// Diagnostic: Use MAX32625MBED pin D5 as DigitalOut EOC#-detected
+    // WIP MAX11043 interrupt EOC echo - moving DigitalOut ScopeTrigger to global scope, it compiles but there is no activity on scope
     DigitalOut ScopeTrigger(D5);
+    // With ScopeTrigger declared inside interrupt handler,
+    // latency is 2.64us before first ScopeTrigger even visible on scope
+    // then 5.32us to final event,
+    // 160us between high/low events.
     ScopeTrigger = 0;
     ScopeTrigger = 1;
     ScopeTrigger = 0;
     ScopeTrigger = 1;
+#endif // MAX11043_ScopeTrigger_MAX32625MBED_D5
 #endif
 #if 0
     // TODO: read 4 channels in response to EOC# falling edge