Skip to content

Commit

Permalink
Add support for BridgeCom SkyBridge HS
Browse files Browse the repository at this point in the history
  • Loading branch information
juribeparada committed Nov 8, 2020
1 parent 89daa20 commit 956ee1a
Show file tree
Hide file tree
Showing 30 changed files with 312 additions and 60 deletions.
4 changes: 2 additions & 2 deletions ADF7021.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2016 by Jim McLaughlin KI6ZUM
* Copyright (C) 2016,2017,2018,2019 by Andy Uribe CA6JAU
* Copyright (C) 2016,2017,2018,2019,2020 by Andy Uribe CA6JAU
* Copyright (C) 2017 by Danilo DB4PLE
*
* Some of the code is based on work of Guus Van Dooren PE1PLM:
Expand Down Expand Up @@ -216,7 +216,7 @@ void CIO::ifConf(MMDVM_STATE modemState, bool reset)
m_frequency_rx = m_pocsag_freq_tx;
}

#if defined (ZUMSPOT_ADF7021)
#if defined (ZUMSPOT_ADF7021) || defined(SKYBRIDGE_HS)
io.checkBand(m_frequency_rx, m_frequency_tx);
#endif

Expand Down
2 changes: 2 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,8 @@ Please check here for detailed instructions:

- make d2rg_mmdvm_hs: upload the firmware to D2RG MMDVM_HS board (using internal serial port)

- make skybridge: upload the firmware to SkyBridge HotSpot board (using internal serial port)

- make dfu [devser=/dev/ttyXXX]: upload firmware using USB bootloader. "devser" is optional, and it corresponds to the USB serial port device name. This option permits to perform a reset to enter to booloader mode (DFU). If you don't use "devser", you have to press the reset button of the ZUMspot just before using this command.

- make serial devser=/dev/ttyXXX: upload standard firmware using serial port bootloader method.
Expand Down
4 changes: 3 additions & 1 deletion Config.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -34,6 +34,8 @@
// #define NANO_DV_REV10
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
// #define D2RG_MMDVM_HS
// 8) BridgeCom SkyBridge HotSpot
// #define SKYBRIDGE_HS

// Enable ADF7021 support:
#define ENABLE_ADF7021
Expand Down
6 changes: 3 additions & 3 deletions IO.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
* Copyright (C) 2016,2017,2018 by Andy Uribe CA6JAU
* Copyright (C) 2016,2017,2018,2019,2020 by Andy Uribe CA6JAU
* Copyright (C) 2017 by Danilo DB4PLE
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -307,7 +307,7 @@ bool CIO::hasRXOverflow()
return m_rxBuffer.hasOverflowed();
}

#if defined(ZUMSPOT_ADF7021)
#if defined(ZUMSPOT_ADF7021) || defined(SKYBRIDGE_HS)
void CIO::checkBand(uint32_t frequency_rx, uint32_t frequency_tx) {
if (!(io.hasSingleADF7021())) {
// There are two ADF7021s on the board
Expand Down Expand Up @@ -380,7 +380,7 @@ uint8_t CIO::setFreq(uint32_t frequency_rx, uint32_t frequency_tx, uint8_t rf_po
#endif

// Check if we have a single, dualband or duplex board
#if defined (ZUMSPOT_ADF7021)
#if defined(ZUMSPOT_ADF7021) || defined(SKYBRIDGE_HS)
if (checkZUMspot(frequency_rx, frequency_tx) > 0) {
return 4U;
}
Expand Down
4 changes: 2 additions & 2 deletions IO.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
* Copyright (C) 2016,2017,2018 by Andy Uribe CA6JAU
* Copyright (C) 2016,2017,2018,2019,2020 by Andy Uribe CA6JAU
* Copyright (C) 2017 by Danilo DB4PLE
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -124,7 +124,7 @@ class CIO {
uint32_t getWatchdog(void);
void getIntCounter(uint16_t &int1, uint16_t &int2);
void selfTest(void);
#if defined(ZUMSPOT_ADF7021)
#if defined(ZUMSPOT_ADF7021) || defined(SKYBRIDGE_HS)
void checkBand(uint32_t frequency_rx, uint32_t frequency_tx);
uint8_t checkZUMspot(uint32_t frequency_rx, uint32_t frequency_tx);
void setBandVHF(bool vhf_on);
Expand Down
8 changes: 4 additions & 4 deletions IOArduino.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
* Copyright (C) 2016,2017,2018 by Andy Uribe CA6JAU
* Copyright (C) 2016,2017,2018,2019,2020 by Andy Uribe CA6JAU
* Copyright (C) 2017 by Danilo DB4PLE
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -28,7 +28,7 @@

// STM32F1 pin definitions, using STM32duino

#if defined(ZUMSPOT_ADF7021)
#if defined(ZUMSPOT_ADF7021) || defined(SKYBRIDGE_HS)

#define PIN_SCLK PB5
#define PIN_SREAD PB6
Expand Down Expand Up @@ -81,7 +81,7 @@
#define PIN_COS_LED PB15

#else
#error "Either ZUMSPOT_ADF7021, LIBRE_KIT_ADF7021, MMDVM_HS_HAT_REV12, MMDVM_HS_DUAL_HAT_REV10, NANO_HOTSPOT or NANO_DV_REV10 need to be defined"
#error "Either ZUMSPOT_ADF7021, LIBRE_KIT_ADF7021, MMDVM_HS_HAT_REV12, MMDVM_HS_DUAL_HAT_REV10, NANO_HOTSPOT, NANO_DV_REV10 or SKYBRIDGE_HS need to be defined"
#endif

#elif defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)
Expand Down Expand Up @@ -156,7 +156,7 @@ void CIO::Init()
{
#if defined (__STM32F1__)

#if defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV10)
#if defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV10) || defined(SKYBRIDGE_HS)
afio_cfg_debug_ports(AFIO_DEBUG_SW_ONLY);
#endif

Expand Down
22 changes: 11 additions & 11 deletions IOSTM.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2016 by Jim McLaughlin KI6ZUM
* Copyright (C) 2016,2017,2018,2019 by Andy Uribe CA6JAU
* Copyright (C) 2016,2017,2018,2019,2020 by Andy Uribe CA6JAU
* Copyright (C) 2017 by Danilo DB4PLE
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -92,7 +92,7 @@
#define PIN_COS_LED GPIO_Pin_13
#define PORT_COS_LED GPIOB

#elif defined(ZUMSPOT_ADF7021)
#elif defined(ZUMSPOT_ADF7021) || defined(SKYBRIDGE_HS)

#define PIN_SCLK GPIO_Pin_5
#define PORT_SCLK GPIOB
Expand Down Expand Up @@ -258,7 +258,7 @@
#define PORT_COS_LED GPIOB

#else
#error "Either PI_HAT_7021_REV_02, ZUMSPOT_ADF7021, LIBRE_KIT_ADF7021, MMDVM_HS_HAT_REV12, MMDVM_HS_DUAL_HAT_REV10, NANO_HOTSPOT, NANO_DV_REV11 or D2RG_MMDVM_HS need to be defined"
#error "Either PI_HAT_7021_REV_02, ZUMSPOT_ADF7021, LIBRE_KIT_ADF7021, MMDVM_HS_HAT_REV12, MMDVM_HS_DUAL_HAT_REV10, NANO_HOTSPOT, NANO_DV_REV11, D2RG_MMDVM_HS or SKYBRIDGE_HS need to be defined"
#endif

extern "C" {
Expand All @@ -280,7 +280,7 @@ extern "C" {
}
#endif

#elif defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV11) || defined(D2RG_MMDVM_HS)
#elif defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV11) || defined(D2RG_MMDVM_HS) || defined(SKYBRIDGE_HS)

#if defined(BIDIR_DATA_PIN)
void EXTI3_IRQHandler(void) {
Expand All @@ -300,7 +300,7 @@ extern "C" {

#if defined(DUPLEX)
void EXTI9_5_IRQHandler(void) {
#if defined(ZUMSPOT_ADF7021)
#if defined(ZUMSPOT_ADF7021) || defined(SKYBRIDGE_HS)
if(EXTI_GetITStatus(EXTI_Line8)!=RESET) {
io.interrupt2();
EXTI_ClearITPendingBit(EXTI_Line8);
Expand Down Expand Up @@ -331,11 +331,11 @@ void CIO::Init()

#if defined(PI_HAT_7021_REV_02)
GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENABLE);
#elif defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV11) || defined(D2RG_MMDVM_HS)
#elif defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV11) || defined(D2RG_MMDVM_HS) || defined(SKYBRIDGE_HS)
GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE);
#endif

#if defined(ZUMSPOT_ADF7021)
#if defined(ZUMSPOT_ADF7021) || defined(SKYBRIDGE_HS)
// Pin defines if the board has a single ADF7021 or double
GPIO_InitStruct.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStruct.GPIO_Pin = PIN_SGL_DBL;
Expand Down Expand Up @@ -532,7 +532,7 @@ void CIO::Init()
EXTI_InitStructure.EXTI_Line = EXTI_Line14;
#endif

#elif defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV11) || defined(D2RG_MMDVM_HS)
#elif defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV11) || defined(D2RG_MMDVM_HS) || defined(SKYBRIDGE_HS)

#if defined(BIDIR_DATA_PIN)
// Connect EXTI3 Line
Expand All @@ -550,7 +550,7 @@ void CIO::Init()
// Connect EXTI5 Line
GPIO_EXTILineConfig(PORT_TXD2_INT, PIN_TXD2_INT);
// Configure EXT5 line
#if defined(ZUMSPOT_ADF7021)
#if defined(ZUMSPOT_ADF7021) || defined(SKYBRIDGE_HS)
EXTI_InitStructure2.EXTI_Line = EXTI_Line8;
#else
EXTI_InitStructure2.EXTI_Line = EXTI_Line5;
Expand Down Expand Up @@ -584,7 +584,7 @@ void CIO::startInt()

NVIC_InitStructure.NVIC_IRQChannel = EXTI15_10_IRQn;

#elif defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV11) || defined(D2RG_MMDVM_HS)
#elif defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12) || defined(MMDVM_HS_DUAL_HAT_REV10) || defined(NANO_HOTSPOT) || defined(NANO_DV_REV11) || defined(D2RG_MMDVM_HS) || defined(SKYBRIDGE_HS)

#if defined(BIDIR_DATA_PIN)
// Enable and set EXTI3 Interrupt
Expand Down Expand Up @@ -754,7 +754,7 @@ void CIO::COS_pin(bool on)
GPIO_WriteBit(PORT_COS_LED, PIN_COS_LED, on ? Bit_SET : Bit_RESET);
}

#if defined(ZUMSPOT_ADF7021)
#if defined(ZUMSPOT_ADF7021) || defined(SKYBRIDGE_HS)
void CIO::setBandVHF(bool vhf_on) {
GPIO_WriteBit(PORT_SET_BAND, PIN_SET_BAND, vhf_on ? Bit_SET : Bit_RESET);
}
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,8 @@ mmdvm_hs_hat: zumspot-pi

mmdvm_hs_dual_hat: zumspot-pi

skybridge: zumspot-pi

hotpot-opipc_opipcplus:
ifneq ($(wildcard /usr/local/bin/stm32flash),)
/usr/local/bin/stm32flash -v -w bin/$(BINBIN_F1) -g 0x0 -R -i 198,-199,199:-198,199 /dev/ttyS3
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ Download the script (*.sh) that matches with your ZUMspot/MMDVM_HS board:
- install_fw_gen_gpio.sh: only for generic MMDVM_HS board (EA7GIB) with GPIO serial interface
- install_fw_duplex_gpio.sh: only for MMDVM_HS with dual ADF7021 (EA7GIB) or generic dual ADF7021 board with GPIO serial interface
- install_fw_duplex_usb.sh: only for MMDVM_HS with dual ADF7021 (EA7GIB) or generic dual ADF7021 board with USB interface
- install_fw_skybridge_rpi.sh: only for BridgeCom SkyBridge HotSpot

For example, download the ZUMspot RPi upgrade script:

Expand Down
2 changes: 1 addition & 1 deletion SerialPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ uint8_t CSerialPort::setConfig(const uint8_t* data, uint8_t length)
DEBUG1("Full duplex not supported with this firmware");
return 6U;
}
#elif defined(DUPLEX) && defined(ZUMSPOT_ADF7021)
#elif defined(DUPLEX) && (defined(ZUMSPOT_ADF7021) || defined(SKYBRIDGE_HS))
if (io.isDualBand() && m_duplex && m_calState == STATE_IDLE && modemState != STATE_DSTARCAL) {
DEBUG1("Full duplex is not supported on this board");
return 6U;
Expand Down
4 changes: 3 additions & 1 deletion configs/D2RG_MMDVM_HS.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -34,6 +34,8 @@
// #define NANO_DV_REV10
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
#define D2RG_MMDVM_HS
// 8) BridgeCom SkyBridge HotSpot
// #define SKYBRIDGE_HS

// Enable ADF7021 support:
#define ENABLE_ADF7021
Expand Down
4 changes: 3 additions & 1 deletion configs/MMDVM_HS_Dual_Hat-12mhz.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU, Florian Wolters DF2ET
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU, Florian Wolters DF2ET
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -34,6 +34,8 @@
// #define NANO_DV_REV10
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
// #define D2RG_MMDVM_HS
// 8) BridgeCom SkyBridge HotSpot
// #define SKYBRIDGE_HS

// Enable ADF7021 support:
#define ENABLE_ADF7021
Expand Down
4 changes: 3 additions & 1 deletion configs/MMDVM_HS_Dual_Hat.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU, Florian Wolters DF2ET
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU, Florian Wolters DF2ET
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -34,6 +34,8 @@
// #define NANO_DV_REV10
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
// #define D2RG_MMDVM_HS
// 8) BridgeCom SkyBridge HotSpot
// #define SKYBRIDGE_HS

// Enable ADF7021 support:
#define ENABLE_ADF7021
Expand Down
4 changes: 3 additions & 1 deletion configs/MMDVM_HS_Hat-12mhz.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU, Florian Wolters DF2ET
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU, Florian Wolters DF2ET
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -34,6 +34,8 @@
// #define NANO_DV_REV10
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
// #define D2RG_MMDVM_HS
// 8) BridgeCom SkyBridge HotSpot
// #define SKYBRIDGE_HS

// Enable ADF7021 support:
#define ENABLE_ADF7021
Expand Down
4 changes: 3 additions & 1 deletion configs/MMDVM_HS_Hat.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017,2018,2019 by Andy Uribe CA6JAU
* Copyright (C) 2017,2018,2019,2020 by Andy Uribe CA6JAU
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -34,6 +34,8 @@
// #define NANO_DV_REV10
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
// #define D2RG_MMDVM_HS
// 8) BridgeCom SkyBridge HotSpot
// #define SKYBRIDGE_HS

// Enable ADF7021 support:
#define ENABLE_ADF7021
Expand Down
4 changes: 3 additions & 1 deletion configs/NanoDV_NPI.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
* Copyright (C) 2018,2019,2020 by Andy Uribe CA6JAU
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -34,6 +34,8 @@
#define NANO_DV_REV11
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
// #define D2RG_MMDVM_HS
// 8) BridgeCom SkyBridge HotSpot
// #define SKYBRIDGE_HS

// Enable ADF7021 support:
#define ENABLE_ADF7021
Expand Down
4 changes: 3 additions & 1 deletion configs/NanoDV_USB.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
* Copyright (C) 2018,2019,2020 by Andy Uribe CA6JAU
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -34,6 +34,8 @@
#define NANO_DV_REV11
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
// #define D2RG_MMDVM_HS
// 8) BridgeCom SkyBridge HotSpot
// #define SKYBRIDGE_HS

// Enable ADF7021 support:
#define ENABLE_ADF7021
Expand Down
4 changes: 3 additions & 1 deletion configs/Nano_hotSPOT.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018,2019 by Andy Uribe CA6JAU
* Copyright (C) 2018,2019,2020 by Andy Uribe CA6JAU
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -34,6 +34,8 @@
// #define NANO_DV_REV10
// 7) D2RG MMDVM_HS RPi (BG3MDO, VE2GZI, CA6JAU)
// #define D2RG_MMDVM_HS
// 8) BridgeCom SkyBridge HotSpot
// #define SKYBRIDGE_HS

// Enable ADF7021 support:
#define ENABLE_ADF7021
Expand Down
Loading

0 comments on commit 956ee1a

Please sign in to comment.