From a987d2b8d5d01556c3a726228b2432a24b1b88d8 Mon Sep 17 00:00:00 2001 From: "Tony Corbett, G0WFV" Date: Wed, 28 Jun 2017 07:08:09 +0100 Subject: [PATCH 1/6] Add git ignore file --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..082d17a --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ + +*.o + +bin/ + +GitVersion\.h From 3645ee19efebfa61c314c1d78128e4ba32bfac09 Mon Sep 17 00:00:00 2001 From: Andy CA6JAU Date: Fri, 30 Jun 2017 22:53:36 -0400 Subject: [PATCH 2/6] Adding pin definitions for Teensy boards --- BUILD.txt | 42 +++++++++++++++++++++++++++++++++++++++--- IOArduino.cpp | 20 ++++++++++++++++++++ SerialArduino.cpp | 9 +++++++++ 3 files changed, 68 insertions(+), 3 deletions(-) diff --git a/BUILD.txt b/BUILD.txt index e802c56..f37434a 100644 --- a/BUILD.txt +++ b/BUILD.txt @@ -296,7 +296,7 @@ SDATA PB6 SCLK PB5 DATA PB4 (TxRxData)* DCLK PB3 (TxRxCLK)* -CLKOUT PA15 (jumper wire in RF7021SE) +CLKOUT PA15 (jumper wire in RF7021SE, not needed with BIDIR_DATA_PIN enabled) PAC PB14 (PTT LED) VCC 3.3 V GND Ground @@ -335,7 +335,7 @@ reducing EMI. Pinout definitions for Arduino Due/Zero + RF7021SE: =================================================== -Use STM32duino + Arduino IDE for building the code +Use Arduino IDE for building the code - Main RF7021SE board: CE 12 @@ -345,7 +345,7 @@ SDATA 4 // 2 in Arduino Zero Pro SCLK 3 DATA 7 (TxRxData)* DCLK 8 (TxRxCLK)* -CLKOUT 2 // 4 in Arduino Zero Pro (jumper wire in RF7021SE) +CLKOUT 2 // 4 in Arduino Zero Pro (jumper wire in RF7021SE, not needed with BIDIR_DATA_PIN enabled) PAC 9 (PTT LED) VCC 3.3 V GND Ground @@ -368,3 +368,39 @@ PIN_DEB 11 * You could install a serie resistor (10 - 100 ohms) in each TxRxData and TxRxCLK lines, for reducing EMI. +Pinout definitions for Teensy (3.1, 3.2, 3.5 or 3.6) + RF7021SE: +=================================================== +Use Teensyduino + Arduino IDE for building the code + +- Main RF7021SE board: +CE 6 +SLE 5 +SREAD 4 +SDATA 3 +SCLK 2 +DATA 7 (TxRxData)* +DCLK 8 (TxRxCLK)* +CLKOUT 22 (jumper wire in RF7021SE, not needed with BIDIR_DATA_PIN enabled) +PAC 14 (PTT LED) +VCC 3.3 V +GND Ground + +- Serial ports: +Teensy USB Port (host communication) +DISP_TXD 1 (Nextion LCD serial repeater) +DISP_RXD 0 (Nextion LCD serial repeater) + +- Status LEDs: +COS_LED 15 +PTT_LED 14 +P25_LED 19 +YSF_LED 18 +DMR_LED 17 +DSTAR_LED 16 + +- Misc pins: +PIN_LED 13 +PIN_DEB 23 + +* You could install a serie resistor (10 - 100 ohms) in each TxRxData and TxRxCLK lines, for +reducing EMI. diff --git a/IOArduino.cpp b/IOArduino.cpp index d99b959..a74a324 100644 --- a/IOArduino.cpp +++ b/IOArduino.cpp @@ -88,6 +88,26 @@ #error "Either PI_HAT_7021_REV_02, PI_HAT_7021_REV_03, or ADF7021_CARRIER_BOARD need to be defined" #endif +#elif defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__) + +// Teensy pin definitions +#define PIN_SCLK 2 +#define PIN_SDATA 3 +#define PIN_SREAD 4 +#define PIN_SLE 5 +#define PIN_CE 6 +#define PIN_RXD 7 +#define PIN_TXD 8 +#define PIN_CLKOUT 22 +#define PIN_LED 13 +#define PIN_DEB 23 +#define PIN_DSTAR_LED 16 +#define PIN_DMR_LED 17 +#define PIN_YSF_LED 18 +#define PIN_P25_LED 19 +#define PIN_PTT_LED 14 +#define PIN_COS_LED 15 + #else // Arduino pin definitions (Due and Zero) diff --git a/SerialArduino.cpp b/SerialArduino.cpp index c2c4c8d..021bfbc 100644 --- a/SerialArduino.cpp +++ b/SerialArduino.cpp @@ -37,6 +37,8 @@ void CSerialPort::beginInt(uint8_t n, int speed) case 3U: #if defined(SERIAL_REPEATER) && defined(__STM32F1__) Serial2.begin(speed); + #elif defined(SERIAL_REPEATER) && (defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)) + Serial1.begin(speed); #endif break; default: @@ -56,6 +58,8 @@ int CSerialPort::availableInt(uint8_t n) case 3U: #if defined(SERIAL_REPEATER) && defined(__STM32F1__) return Serial2.available(); + #elif defined(SERIAL_REPEATER) && (defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)) + return Serial1.available(); #endif default: return false; @@ -74,6 +78,8 @@ uint8_t CSerialPort::readInt(uint8_t n) case 3U: #if defined(SERIAL_REPEATER) && defined(__STM32F1__) return Serial2.read(); + #elif defined(SERIAL_REPEATER) && (defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)) + return Serial1.read(); #endif default: return 0U; @@ -97,6 +103,9 @@ void CSerialPort::writeInt(uint8_t n, const uint8_t* data, uint16_t length, bool #if defined(SERIAL_REPEATER) && defined(__STM32F1__) Serial2.write(data, length); break; + #elif defined(SERIAL_REPEATER) && (defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)) + Serial1.write(data, length); + break; #endif default: break; From fd5a3cf53208ff146d051d599f8a43226ed0cf8a Mon Sep 17 00:00:00 2001 From: Andy CA6JAU Date: Fri, 30 Jun 2017 22:53:48 -0400 Subject: [PATCH 3/6] Updating comments --- Config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config.h b/Config.h index e578856..3fdec76 100644 --- a/Config.h +++ b/Config.h @@ -19,7 +19,7 @@ #if !defined(CONFIG_H) #define CONFIG_H -// Select one board: +// Select one board (STM32F103 based boards): // 1) Initial release of ZUM-Spot Pi: // #define PI_HAT_7021_REV_02 // 2) ZUM-Spot USB and ZUM-Spot Pi HAT: From 58ecbea31b2d5b156fa2ce5a83b0d46b9f4af39c Mon Sep 17 00:00:00 2001 From: Andy CA6JAU Date: Fri, 30 Jun 2017 23:05:56 -0400 Subject: [PATCH 4/6] Updating README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 65cbe9d..17fe0ae 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -This is the source code of ZUMSpot, personal hotspot (ADF7021 version of the MMDVM firmware), based on Jonathan G4KLX's MMDVM software. This firmware supports D-Star, DMR, System Fusion and P25 digital modes. +This is the source code of ZUMSpot, personal hotspot (ADF7021 version of the MMDVM firmware), based on Jonathan G4KLX's MMDVM software. This firmware supports D-Star, DMR, System Fusion and P25 digital modes. -This software is intended to be run on STM32F103 microcontroller. You can build this code using Arduino IDE with STM32duino package, and using "make" with ARM GCC tools. Also, Arduino with 3.3 V I/O is supported, this firmware works on Arduino Due and Arduino Zero. Please see BUILD.txt for more details, and also MMDVM Yahoo Groups. +This software is intended to be run on STM32F103 microcontroller. You can build this code using Arduino IDE with STM32duino package, or using "make" with ARM GCC tools. Also, Arduino with 3.3 V I/O (Arduino Due and Zero) and Teensy (3.1, 3.2, 3.5 or 3.6) are supported. Please see BUILD.txt for more details, and also MMDVM Yahoo Groups. This software is licenced under the GPL v2 and is intended for amateur and educational use only. Use of this software for commercial purposes is strictly forbidden. From c187670591282254ef7f724c506a236c0303921d Mon Sep 17 00:00:00 2001 From: Andy CA6JAU Date: Sat, 1 Jul 2017 18:26:30 -0400 Subject: [PATCH 5/6] Updating Windows build instructions --- BUILD.txt | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/BUILD.txt b/BUILD.txt index f37434a..fbf96f4 100644 --- a/BUILD.txt +++ b/BUILD.txt @@ -87,16 +87,19 @@ nano MMDVM.ini - Execute MMDVMHost: ./MMDVMHost MMDVM.ini -2) ZUMSpot USB: +2) ZUMSpot Libre Kit and ZUMSpot USB: * Windows: -- Download and install the version 1.6.9 of the Arduino IDE: -https://www.arduino.cc/en/Main/OldSoftwareReleases#previous +- Download and install the Arduino IDE: +https://www.arduino.cc/en/Main/Software + +- Run Arduino IDE. On the Tools menu, select the Boards manager, and install the "Arduino SAM" +Boards from the list of available boards. - Download STM32duino (Arduino for STM32) from this URL: https://github.com/rogerclarkmelbourne/Arduino_STM32/tree/ZUMspot -- Unzip to create the Arduino_STM32 folder +- Unzip and change the main folder "Arduino_STM32-ZUMSpot" to "Arduino_STM32" - Copy Arduino_STM32 folder in: My Documents/Arduino/hardware @@ -104,11 +107,19 @@ My Documents/Arduino/hardware - Install the USB bootloader to STM32F103. Follow the instructions: https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/stm32duino-bootloader +- Connect the ZUMSpot USB to your PC. Install the USB Mapple driver using the bat file: +My Documents/Arduino/hardware/Arduino_STM32/drivers/win/install_drivers.bat +(you may also check: http://wiki.stm32duino.com/index.php?title=Windows_driver_installation) + +- You have to be sure that Windows detect your ZUMSpot as an USB serial device COMx (please +see Windows Device Manager) + - Download the source (zip file) of MMDVM_HS from https://github.com/juribeparada/MMDVM_HS -(Do not download or install the STM32F103 libraries, STM32F10X_Lib, they are not necessary +(Do not download or install the STM32F103 library, STM32F10X_Lib, this is not necessary under STM32duino). -- Unzip MMDVM_HS-master.zip in a local folder. +- Unzip MMDVM_HS-master.zip and change the folder name to "MMDVM_HS". The path name to this +folder can't have spaces. - Start the Arduino IDE. Open the MMDVM_HS.ino file in the MMDVM_HS folder. @@ -131,8 +142,9 @@ Serial port: COMx (Maple Mini) - Click the Upload button in the IDE and wait for the transfer. -- Once the transfer is completed, press the RESET button of the board. In the case of -ZUMSpot Libre Kit, you will see the LED (PC13) of the blue pill blinking. +- Once the transfer is completed, press the RESET button of the board or disconnect and +connect the USB cable. In the case of ZUMSpot Libre Kit, you will see the LED (PC13) of +the blue pill blinking. - Once you connect with MMDVMHost, the LED will blink fast in the ZUMSpot Libre Kit. From e7fad3220e8c2b713c9343b95bd3705253706499 Mon Sep 17 00:00:00 2001 From: Andy CA6JAU Date: Mon, 3 Jul 2017 14:38:42 -0400 Subject: [PATCH 6/6] Adding some note in BUILD.txt --- BUILD.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BUILD.txt b/BUILD.txt index fbf96f4..4d749f0 100644 --- a/BUILD.txt +++ b/BUILD.txt @@ -57,6 +57,8 @@ git clone https://github.com/juribeparada/MMDVM_HS cd MMDVM_HS/ git clone https://github.com/juribeparada/STM32F10X_Lib +(Please do not download any different code inside MMDVM_HS folder) + - Edit Config.h nano Config.h (and enable): @@ -159,6 +161,8 @@ git clone https://github.com/juribeparada/MMDVM_HS cd MMDVM_HS/ git clone https://github.com/juribeparada/STM32F10X_Lib +(Please do not download any different code inside MMDVM_HS folder) + - Edit Config.h nano Config.h (and enable):