Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MaximTinyTester CmdLine MAX5171 USBDevice
Revision 12:8faea635a2cd, committed 2019-07-10
- Comitter:
- whismanoid
- Date:
- Wed Jul 10 11:50:37 2019 +0000
- Parent:
- 11:48aefcaa1d29
- Child:
- 13:9d1a7d1c4d3c
- Commit message:
- Support MAX32600
Changed in this revision
| MaximTinyTester.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/MaximTinyTester.lib Wed Jun 26 01:06:34 2019 +0000 +++ b/MaximTinyTester.lib Wed Jul 10 11:50:37 2019 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/users/whismanoid/code/MaximTinyTester/#f98ddb04f9e0 +https://os.mbed.com/users/whismanoid/code/MaximTinyTester/#9b20cadbfa15
--- a/main.cpp Wed Jun 26 01:06:34 2019 +0000
+++ b/main.cpp Wed Jul 10 11:50:37 2019 +0000
@@ -47,6 +47,8 @@
#define STRING_ARG(arg) #arg
#define STRING_NAME(name) STRING_ARG(name)
#define TARGET_NAME STRING_NAME(TARGET)
+#elif defined(TARGET_MAX32600)
+#define TARGET_NAME "MAX32600"
#elif defined(TARGET_LPC1768)
#define TARGET_NAME "LPC1768"
#elif defined(TARGET_NUCLEO_F446RE)
@@ -233,6 +235,13 @@
#define D13 P1_0
#endif
//--------------------------------------------------
+#elif defined(TARGET_MAX32600)
+// target MAX32600
+//
+#define analogIn4_IS_HIGH_RANGE_OF_analogIn0 0
+const float ADC_FULL_SCALE_VOLTAGE = 1.500;
+//
+//--------------------------------------------------
#elif defined(TARGET_NUCLEO_F446RE) || defined(TARGET_NUCLEO_F401RE)
// TODO1: target NUCLEO_F446RE
//
@@ -479,6 +488,10 @@
DigitalOut spi2_max541_cs(SPI2_SS); // TARGET_MAX32635MBED: P2_7 Arduino 2x3-pin header
#define HAS_SPI2_MAX541 1
//
+#elif defined(TARGET_MAX32600)
+SPI spi(SPI2_MOSI, SPI2_MISO, SPI2_SCK); // mosi, miso, sclk spi1 TARGET_MAX32600MBED: Arduino 10-pin header D11 D12 D13
+DigitalOut spi_cs(SPI2_SS); // Generic: Arduino 10-pin header D10
+//
#elif defined(TARGET_NUCLEO_F446RE) || defined(TARGET_NUCLEO_F401RE)
// TODO1: avoid resource conflict between P5_0, P5_1, P5_2 SPI and DigitalInOut
// void spi_init(spi_t *obj, PinName mosi, PinName miso, PinName sclk, PinName ssel)
@@ -670,6 +683,16 @@
// The baud rate does not affect the virtual USBSerial UART.
USBSerial serial;
//--------------------------------------------------
+#elif defined(TARGET_MAX32600)
+ #include "USBSerial.h"
+// Hardware serial port over DAPLink
+// The default baud rate for the DapLink UART is 9600
+Serial DAPLINKserial(P1_1, P1_0); // tx, rx
+ #define HAS_DAPLINK_SERIAL 1
+// Virtual serial port over USB
+// The baud rate does not affect the virtual USBSerial UART.
+USBSerial serial;
+//--------------------------------------------------
#elif defined(TARGET_NUCLEO_F446RE) || defined(TARGET_NUCLEO_F401RE)
Serial serial(SERIAL_TX, SERIAL_RX); // tx, rx
//--------------------------------------------------
@@ -1266,6 +1289,32 @@
AnalogIn analogIn5(AIN_5); // TARGET_MAX32630 J1.6 AIN_5 = AIN1 / 5.0 fullscale is 6.0V
#endif
//--------------------------------------------------
+#elif defined(TARGET_MAX32600)
+ #define HAS_analogIn0 1
+ #define HAS_analogIn1 1
+ #define HAS_analogIn2 1
+ #define HAS_analogIn3 1
+ #define HAS_analogIn4 1
+ #define HAS_analogIn5 1
+#if HAS_analogIn0
+ AnalogIn analogIn0(A0);
+#endif
+#if HAS_analogIn1
+ AnalogIn analogIn1(A1);
+#endif
+#if HAS_analogIn2
+ AnalogIn analogIn2(A2);
+#endif
+#if HAS_analogIn3
+ AnalogIn analogIn3(A3);
+#endif
+#if HAS_analogIn4
+ AnalogIn analogIn4(A4);
+#endif
+#if HAS_analogIn5
+ AnalogIn analogIn5(A5);
+#endif
+//--------------------------------------------------
#elif defined(TARGET_NUCLEO_F446RE)
#define HAS_analogIn0 1
#define HAS_analogIn1 1