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

Dependencies:   MaximTinyTester CmdLine MAX541 MAX5715 USBDevice

Files at this revision

API Documentation at this revision

Comitter:
whismanoid
Date:
Thu Jul 18 18:37:55 2019 -0700
Parent:
17:bf4efc8f5eee
Commit message:
MAX32620FTHR support: USBSerial not working yet...

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r bf4efc8f5eee -r 14afc2a2150f main.cpp
--- a/main.cpp	Thu Jul 18 14:24:49 2019 -0700
+++ b/main.cpp	Thu Jul 18 18:37:55 2019 -0700
@@ -337,7 +337,7 @@
 #warning "TARGET_MAX32625PICO not previously tested; need to define pins..."
 //#define USE_LEDS 0 ?
 #define analogIn4_IS_HIGH_RANGE_OF_analogIn0 1
-#warning "TARGET_MAX32620FTHR not previously tested; need to verify ADC_FULL_SCALE_VOLTAGE..."
+#warning "TARGET_MAX32625PICO not previously tested; need to verify ADC_FULL_SCALE_VOLTAGE..."
 const float ADC_FULL_SCALE_VOLTAGE = 1.200;
 //
 //--------------------------------------------------
@@ -617,9 +617,6 @@
 //
 #elif defined(TARGET_MAX32620FTHR)
 #warning "TARGET_MAX32620FTHR not previously tested; need to define SPI pins..."
-// Note to software maintainer:
-// when adding new platform support,
-// add another #elif block above to support the new platform
 //
 // SPI0 P0_ PMOD Port 0 Back access
 //SPI spi0(SPI0_MOSI, SPI0_MISO, SPI0_SCK); // mosi, miso, sclk spi1 TARGET_MAX32620FTHR: PMOD Port 0 Back access
@@ -847,11 +844,21 @@
 //--------------------------------------------------
 #elif defined(TARGET_MAX32620FTHR)
 #warning "TARGET_MAX32620FTHR not previously tested; need to define serial pins..."
-// Note to software maintainer:
-// when adding new platform support,
-// add another #elif block above to support the new platform
+// Hardware serial port over DAPLink
+// The default baud rate for the DapLink UART is 9600
+Serial DAPLINKserial(USBTX, USBRX);     // tx, rx MAX32620FTHR: P2_1,P2_0
+//Serial DAPLINKserial(STDIO_UART_TX, STDIO_UART_RX);     // tx, rx
+    #define HAS_DAPLINK_SERIAL 1
+// Virtual serial port over USB
+// The baud rate does not affect the virtual USBSerial UART.
+//    #include "USBSerial.h"
+//USBSerial serial;
+//Serial serial(UART0_TX, UART0_RX);     // tx, rx MAX32620FTHR: P0_1,P0_0 (PMOD Port 0)
+//Serial serial(UART1_TX, UART1_RX);     // tx, rx MAX32620FTHR: P2_1,P2_0 (DAPLINK)
+Serial serial(UART2_TX, UART2_RX);     // tx, rx MAX32620FTHR: P3_1,P3_0 (J1.15,J1.14)
+//Serial serial(UART3_TX, UART3_RX);     // tx, rx MAX32620FTHR: P5_4,P5_3 (J2.7,J2.8)
 //Serial serial(SERIAL_TX, SERIAL_RX);     // tx, rx
-Serial serial(USBTX, USBRX);     // tx, rx
+//Serial serial(USBTX, USBRX);     // tx, rx
 //Serial serial(UART_TX, UART_RX);     // tx, rx
 //
 //--------------------------------------------------