Test program running on MAX32625MBED. Control through USB Serial commands using a terminal emulator such as teraterm or putty.
Dependencies: MaximTinyTester CmdLine MAX5171 MAX541 USBDevice
Diff: main.cpp
- Revision:
- 14:3232e8b26e55
- Parent:
- 13:9d1a7d1c4d3c
- Child:
- 15:8eff20290998
--- a/main.cpp Wed Jul 10 21:52:35 2019 +0000 +++ b/main.cpp Fri Jul 12 06:42:40 2019 +0000 @@ -37,8 +37,14 @@ // - MAX5171BOB // Platforms: // - MAX32625MBED +// - supports mbed-os-5.11, requires USBDevice library +// - MAX32600MBED // - NUCLEO_F446RE +// - remove USBDevice library // - NUCLEO_F401RE +// - remove USBDevice library +// - MAX32630FTHR +// - add http://developer.mbed.org/teams/MaximIntegrated/code/max32630fthr/ #include "mbed.h" #if defined(TARGET) @@ -70,15 +76,15 @@ // analogIn0/4 | [a] AIN_0 1.2Vfs (bat) SYS [ ] | switched BAT+ // analogIn1/5 | [a] AIN_1 1.2Vfs PWR [ ] | external pwr btn // analogIn2 | [a] AIN_2 1.2Vfs +5V VBUS [ ] | USB +5V power -// analogIn3 | [a] AIN_3 1.2Vfs 1-WIRE P4_0 [d] | dig9 -// (I2C2.SDA) | [d] P5_7 SDA2 SRN P5_6 [d] | dig8 -// (I2C2.SCL) | [d] P6_0 SCL2 SDIO3 P5_5 [d] | dig7 -// (SPI.SCLK) | [s] P5_0 SCLK SDIO2 P5_4 [d] | dig6 -// (SPI.MOSI) | [s] P5_1 MOSI SSEL P5_3 [d] | dig5 -// (SPI.MISO) | [s] P5_2 MISO RTS P3_3 [d] | dig4 -// (SPI.CS ) | [s] P3_0 RX CTS P3_2 [d] | dig3 -// dig0 | [d] P3_1 TX SCL P3_5 [d] | dig2 -// ______ | [ ] GND SDA P3_4 [d] | dig1 +// analogIn3 | [a] AIN_3 1.2Vfs 1-WIRE P4_0 [d] | D0 dig9 +// (I2C2.SDA) | [d] P5_7 SDA2 SRN P5_6 [d] | D1 dig8 +// (I2C2.SCL) | [d] P6_0 SCL2 SDIO3 P5_5 [d] | D2 dig7 +// D13/SCLK | [s] P5_0 SCLK SDIO2 P5_4 [d] | D3 dig6 +// D11/MOSI | [s] P5_1 MOSI SSEL P5_3 [d] | D4 dig5 +// D12/MISO | [s] P5_2 MISO RTS P3_3 [d] | D5 dig4 +// D10/CS | [s] P3_0 RX CTS P3_2 [d] | D6 dig3 +// D9 dig0 | [d] P3_1 TX SCL P3_5 [d] | D7 dig2 +// ______ | [ ] GND SDA P3_4 [d] | D8 dig1 // | | // | XIP Flash MAX14690N | // | XIP_SCLK P1_0 SDA2 P5_7 | @@ -117,6 +123,61 @@ #define analogIn4_IS_HIGH_RANGE_OF_analogIn0 1 // MAX32630FTHR board supports only internal VREF = 1.200V at bypass capacitor C15 const float ADC_FULL_SCALE_VOLTAGE = 1.200; +// Arduino connector +#ifndef A0 +#define A0 AIN_0 +#endif +#ifndef A1 +#define A1 AIN_1 +#endif +#ifndef A2 +#define A2 AIN_2 +#endif +#ifndef A3 +#define A3 AIN_3 +#endif +#ifndef D0 +#define D0 P4_0 +#endif +#ifndef D1 +#define D1 P5_6 +#endif +#ifndef D2 +#define D2 P5_5 +#endif +#ifndef D3 +#define D3 P5_4 +#endif +#ifndef D4 +#define D4 P5_3 +#endif +#ifndef D5 +#define D5 P3_3 +#endif +#ifndef D6 +#define D6 P3_2 +#endif +#ifndef D7 +#define D7 P3_5 +#endif +#ifndef D8 +#define D8 P3_4 +#endif +#ifndef D9 +#define D9 P3_1 +#endif +#ifndef D10 +#define D10 P3_0 +#endif +#ifndef D11 +#define D11 P5_1 +#endif +#ifndef D12 +#define D12 P5_2 +#endif +#ifndef D13 +#define D13 P5_0 +#endif //-------------------------------------------------- #elif defined(TARGET_MAX32625MBED) //-------------------------------------------------- @@ -1550,6 +1611,8 @@ // use BUTTON1 trigger some action #if defined(TARGET_MAX32630) #define HAS_BUTTON1_DEMO_INTERRUPT 1 +#define HAS_BUTTON2_DEMO 0 +#define HAS_BUTTON2_DEMO_INTERRUPT 0 #elif defined(TARGET_MAX32625) #define HAS_BUTTON1_DEMO_INTERRUPT 1 #define HAS_BUTTON2_DEMO_INTERRUPT 1