Internal_Datalogger but with USB support removed (for MAX40108 Demo board), proof of concept that MAX32625 can be used successfully with VDDB(USB) left unpowered, as long as the USB library is not used.
Dependencies: max32625pico CmdLine
Diff: DataLogger_Internal.cpp
- Revision:
- 7:949ec8581f5e
- Parent:
- 6:f6d16658342b
- Child:
- 8:dffee7509bfb
--- a/DataLogger_Internal.cpp Sun Nov 29 11:06:18 2020 +0000 +++ b/DataLogger_Internal.cpp Mon Nov 30 02:10:01 2020 +0000 @@ -46,6 +46,7 @@ // - remove max32630fthr library (if present) // - remove MAX32620FTHR library (if present) // - MAX32600MBED +// - Please note the last supported version is Mbed OS 6.3. // - remove max32630fthr library (if present) // - remove MAX32620FTHR library (if present) // - Windows 10 note: Don't connect HDK until you are ready to load new firmware into the board. @@ -59,7 +60,7 @@ // - remove MAX32620FTHR library (if present) // - MAX32630FTHR // - #include "max32630fthr.h" -// - add http://os.mbed.org/teams/MaximIntegrated/code/max32630fthr/ +// - add http://developer.mbed.org/teams/MaximIntegrated/code/max32630fthr/ // - remove MAX32620FTHR library (if present) // - MAX32620FTHR // - #include "MAX32620FTHR.h" @@ -2322,65 +2323,100 @@ // default baud rate settings are 9600 8N1 // install device driver from http://developer.mbed.org/media/downloads/drivers/mbedWinSerial_16466.exe // see docs https://docs.mbed.com/docs/mbed-os-handbook/en/5.5/getting_started/what_need/ +//-------------------------------------------------- #if defined(TARGET_MAX32630) - #include "USBSerial.h" +//Serial UART0serial(UART0_TX,UART0_RX); // tx,rx UART0 MAX32630FTHR: P0_1,P0_0 (Bluetooth PAN1326B) +//Serial UART1serial(UART1_TX,UART1_RX); // tx,rx UART1 MAX32630FTHR: P2_1,P2_0 (DAPLINK) +//Serial UART2serial(UART2_TX,UART2_RX); // tx,rx UART2 MAX32630FTHR: P3_1,P3_0 (J1.15,J1.14) +//Serial UART3serial(UART3_TX,UART3_RX); // tx,rx UART3 MAX32630FTHR: P5_4,P5_3 (J3.7,J3.8) +// +// TX/RX auxiliary UART port cmdLine_AUXserial AUXserial +Serial AUXserial(UART2_TX,UART2_RX); // tx,rx UART2 MAX32630FTHR: P3_1,P3_0 (J1.15,J1.14) +//Serial J3AUXserial(UART3_TX,UART3_RX); // tx,rx UART3 MAX32630FTHR: P5_4,P5_3 (J3.7,J3.8) +//Serial BTAUXserial(UART0_TX,UART0_RX); // tx,rx UART0 MAX32630FTHR: P0_1,P0_0 (Bluetooth PAN1326B) + #define HAS_AUX_SERIAL 1 +// // Hardware serial port over DAPLink // The default baud rate for the DapLink UART is 9600 -//Serial DAPLINKserial(P2_1, P2_0); // tx, rx -// #define HAS_DAPLINK_SERIAL 1 +Serial DAPLINKserial(P2_1,P2_0); // tx,rx UART1 MAX32630FTHR: P2_1,P2_0 (DAPLINK) + #define HAS_DAPLINK_SERIAL 1 +// // Virtual serial port over USB + #include "USBSerial.h" // The baud rate does not affect the virtual USBSerial UART. USBSerial serial; //-------------------------------------------------- #elif defined(TARGET_MAX32625MBED) - #include "USBSerial.h" +//Serial UART0serial(UART0_TX,UART0_RX); // tx,rx UART0 MAX32625MBED: P0_1,P0_0 (Arduino D1,D0) +//Serial UART1serial(UART1_TX,UART1_RX); // tx,rx UART1 MAX32625MBED: P2_1,P2_0 (DAPLINK) +//Serial UART2serial(UART2_TX,UART2_RX); // tx,rx UART2 MAX32625MBED: P3_1,P3_0 (J15-LEDgreen,LEDred) +// // Hardware serial port over DAPLink // The default baud rate for the DapLink UART is 9600 -//Serial DAPLINKserial(P2_1, P2_0); // tx, rx -// #define HAS_DAPLINK_SERIAL 1 +Serial DAPLINKserial(P2_1,P2_0); // tx,rx UART1 MAX32625MBED: P2_1,P2_0 (DAPLINK) + #define HAS_DAPLINK_SERIAL 1 +// // Virtual serial port over USB + #include "USBSerial.h" // The baud rate does not affect the virtual USBSerial UART. USBSerial serial; //-------------------------------------------------- #elif defined(TARGET_MAX32625PICO) +//Serial UART0serial(UART0_TX,UART0_RX); // tx,rx UART0 MAX32625PICO: P0_1,P0_0 (pin 19/20) +//Serial UART1serial(UART1_TX,UART1_RX); // tx,rx UART1 MAX32625PICO: P2_1,P2_0 (underside?) +//Serial UART2serial(UART2_TX,UART2_RX); // tx,rx UART2 MAX32625PICO: P3_1,P3_0 (DAPLINK) +// +// TX/RX auxiliary UART port cmdLine_AUXserial AUXserial +Serial AUXserial(UART0_TX,UART0_RX); // tx,rx UART0 MAX32625PICO: P0_1,P0_0 (pin 19/20) + #define HAS_AUX_SERIAL 1 +// +// Hardware serial port over DAPLink +Serial DAPLINKserial(UART2_TX,UART2_RX); // tx,rx UART2 MAX32625PICO: P3_1,P3_0 (DAPLINK) + #define HAS_DAPLINK_SERIAL 1 +// +// Virtual serial port over USB #include "USBSerial.h" -// Virtual serial port over USB // The baud rate does not affect the virtual USBSerial UART. USBSerial serial; -// TX/RX auxiliary UART port cmdLine_AUXserial AUXserial -Serial AUXserial(UART0_TX, UART0_RX); // MAX32625PICO pin 19/20 TX P0_1, RX P0_0 - #define HAS_AUX_SERIAL 1 -//Serial serial(UART1_TX, UART1_RX); // MAX32625PICO underside? TX P2_1, RX P2_0 -//Serial DAPLINKserial(UART2_TX, UART2_RX); // MAX32625PICO DAPLINK TX P3_1, RX P3_0 -// #define HAS_DAPLINK_SERIAL 1 //-------------------------------------------------- #elif defined(TARGET_MAX32620FTHR) #warning "TARGET_MAX32620FTHR not previously tested; need to define serial pins..." +//Serial UART0serial(UART0_TX,UART0_RX); // tx,rx UART0 MAX32620FTHR: P0_1,P0_0 (PMOD0.2,PMOD0.3) +//Serial UART1serial(UART1_TX,UART1_RX); // tx,rx UART1 MAX32620FTHR: P2_1,P2_0 (DAPLINK) +//Serial UART2serial(UART2_TX,UART2_RX); // tx,rx UART2 MAX32620FTHR: P3_1,P3_0 (J1.15,J1.14) +//Serial UART3serial(UART3_TX,UART3_RX); // tx,rx UART3 MAX32620FTHR: P5_4,P5_3 (J2.7,J2.8) +// +// TX/RX auxiliary UART port cmdLine_AUXserial AUXserial +Serial serial(UART2_TX,UART2_RX); // tx,rx UART2 MAX32620FTHR: P3_1,P3_0 (J1.15,J1.14) +//Serial AUXserial(UART2_TX,UART2_RX); // tx,rx UART2 MAX32620FTHR: P3_1,P3_0 (J1.15,J1.14) +Serial AUXserial(UART3_TX,UART3_RX); // tx,rx UART3 MAX32620FTHR: P5_4,P5_3 (J2.7,J2.8) +//Serial PMOD0AUXserial(UART0_TX,UART0_RX); // tx,rx UART0 MAX32620FTHR: P0_1,P0_0 (PMOD0.2,PMOD0.3) + #define HAS_AUX_SERIAL 1 +// // 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(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) -// TX/RX auxiliary UART port cmdLine_AUXserial AUXserial -Serial AUXserial(UART2_TX, UART2_RX); // tx, rx MAX32620FTHR: P3_1,P3_0 (J1.15,J1.14) - #define HAS_AUX_SERIAL 1 -//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(UART_TX, UART_RX); // tx, rx +// The baud rate does not affect the virtual USBSerial UART. +//USBSerial serial; // MAX32620FTHR: USBSerial crash?? +#warning "TARGET_MAX32620FTHR not previously tested; USBSerial crash?" //-------------------------------------------------- #elif defined(TARGET_MAX32600) - #include "USBSerial.h" +//Serial UART0serial(UART0_TX,UART0_RX); // tx,rx UART0 MAX32600MBED: P1_1,P1_0 (Arduino D1,D0)(DAPLINK) +//Serial UART1serial(UART1_TX,UART1_RX); // tx,rx UART2 MAX32625MBED: P1_3,P1_2 (Arduino D3,D2) +//Serial UART2serial(UART2_TX,UART2_RX); // tx,rx UART1 MAX32625MBED: P7_3,P7_2 ( ?? ) +// // Hardware serial port over DAPLink // The default baud rate for the DapLink UART is 9600 -Serial DAPLINKserial(P1_1, P1_0); // tx, rx +Serial DAPLINKserial(P1_1,P1_0); // tx,rx UART0 MAX32600MBED: P1_1,P1_0 (Arduino D1,D0)(DAPLINK) #define HAS_DAPLINK_SERIAL 1 +// // Virtual serial port over USB + #include "USBSerial.h" // The baud rate does not affect the virtual USBSerial UART. USBSerial serial; //--------------------------------------------------