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:
68:ffee1e54d3fe
Child:
71:62bcd01ea87f
--- a/Test_Main_MAX11043.cpp	Fri Feb 21 00:45:32 2020 +0000
+++ b/Test_Main_MAX11043.cpp	Fri Feb 21 10:40:45 2020 +0000
@@ -1719,7 +1719,27 @@
 DigitalOut SHDN_pin(D8); // Digital Configuration Input to MAX11043 device
 DigitalOut DACSTEP_pin(D7); // Digital Configuration Input to MAX11043 device
 DigitalOut UP_slash_DWNb_pin(D6); // Digital Configuration Input to MAX11043 device
+//--------------------------------------------------
+// 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.
+#ifndef MAX11043_EOC_INTERRUPT_POLLING
+#define MAX11043_EOC_INTERRUPT_POLLING 1
+#endif // MAX11043_EOC_INTERRUPT_POLLING
+//--------------------------------------------------
+// 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 EOC_pin(D2); // Digital Event Output from MAX11043 device
+#else // MAX11043_EOC_INTERRUPT_POLLING
+// MAX11043 EOC End Of Conversion input is InterruptIn(PinName:EOC_pin).fall(onEOCFallingEdge);
+InterruptIn EOC_pin(D2); // Digital Event Output from MAX11043 device
+#endif // MAX11043_EOC_INTERRUPT_POLLING
+//--------------------------------------------------
 // example code declare device instance
 MAX11043 g_MAX11043_device(spi, spi_cs, CONVRUN_pin, SHDN_pin, DACSTEP_pin, UP_slash_DWNb_pin, EOC_pin, MAX11043::MAX11043_IC);