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:
70:f44a577c9e59
Parent:
69:989e392cf635
Child:
82:9ea067fad5c3
diff -r 989e392cf635 -r f44a577c9e59 MAX11043/MAX11043.h
--- a/MAX11043/MAX11043.h	Fri Feb 21 00:45:32 2020 +0000
+++ b/MAX11043/MAX11043.h	Fri Feb 21 10:40:45 2020 +0000
@@ -69,7 +69,7 @@
 // EOC# asserts low when new data is available.
 // Initiate a data read prior to the next rising edge of EOC# or the result is overwritten.
 #ifndef MAX11043_EOC_INTERRUPT_POLLING
-#define MAX11043_EOC_INTERRUPT_POLLING 1
+#define MAX11043_EOC_INTERRUPT_POLLING 0
 #endif // MAX11043_EOC_INTERRUPT_POLLING
 //--------------------------------------------------
 // MAX11043 ADC Read operations must be synchronized to EOC End Of Conversion
@@ -735,7 +735,20 @@
 // OutputPin Name = EOC
 // OutputPin Description = End of Conversion Output. Active-Low End-of-Conversion Indicator. EOC asserts low to indicate that new data is ready.
 // OutputPin Function = Event
+//--------------------------------------------------
+// MAX11043 ADC Read operations must be synchronized to EOC End Of Conversion
+// EOC# asserts low when new data is available.
+// Initiate a data read prior to the next rising edge of EOC# or the result is overwritten.
+#if MAX11043_EOC_INTERRUPT_POLLING
+// MAX11043 EOC End Of Conversion input should be InterruptIn(PinName:EOC_pin).fall(onEOCFallingEdge);
+// Workaround using DigitalIn(PinName:EOC_pin) polled to sync with EOC falling edge for ADC reads
+// 2020-02-20 MAX11043_EOC_INTERRUPT_POLLING works on MAX32625MBED at 9us conversion rate, with 1us timing margin
     DigitalIn &m_EOC_pin;
+#else // MAX11043_EOC_INTERRUPT_POLLING
+// MAX11043 EOC End Of Conversion input is InterruptIn(PinName:EOC_pin).fall(onEOCFallingEdge);
+    InterruptIn &m_EOC_pin;
+#endif // MAX11043_EOC_INTERRUPT_POLLING
+//--------------------------------------------------
 //
 
     // Identifies which IC variant is being used