From 46acb553084b2efa57e2bb270271752badc44d1c Mon Sep 17 00:00:00 2001 From: Linar Yusupov Date: Tue, 24 Sep 2024 08:56:30 +0300 Subject: [PATCH] [LR1110] revert to original RF switch logic for a while --- README.md | 5 +++++ .../source/SoftRF/src/driver/radio/radiolib.cpp | 13 ++++++++++--- software/firmware/source/libraries/OGN/freqplan.h | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2ff4f8a43..27ac2ad23 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,9 @@ DIY, multi-functional, compatible, sub-1 GHz ISM band radio based proximity awar * can operate **multiple protocols** at the same time * [**Octave Concept**](https://github.com/lyusupov/SoftRF/wiki/Octave-Concept) * [**Duo Concept**](https://github.com/lyusupov/SoftRF/wiki/Eco-Edition#duo-concept) ![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg) +* has **flight recorder** + * [**Prime Mark III**](https://github.com/lyusupov/SoftRF/wiki/Prime-Edition-MkIII) ![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/hot_icon.jpg) + * [**Flight Recorder**](https://github.com/lyusupov/SoftRF/wiki/Flight-Recorder) * **Weatherproof** * [**Lego Edition**](https://github.com/lyusupov/SoftRF/wiki/Lego-Edition) - IP67 * **UAV** add-on @@ -115,6 +118,7 @@ Model(s)|Platform|First appearance|       Sta 1 [**Standalone**](https://github.com/lyusupov/SoftRF/wiki/Standalone-Edition) **upgrade**![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)
2 [**Eco**](https://github.com/lyusupov/SoftRF/wiki/Eco-Edition)![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)
3 [**Duo**](https://github.com/lyusupov/SoftRF/wiki/Eco-Edition#duo-concept)![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/new-icon.jpg)|[Espressif
ESP32-C6](https://en.wikipedia.org/wiki/ESP32#ESP32-C6)|Q1 2024|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_may_need_imp.png)|2 [RISC-V](https://en.wikipedia.org/wiki/RISC-V) cores
big.LITTLE [**Academy**](https://github.com/lyusupov/SoftRF/wiki/Academy-Edition) ![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/updated-icon.gif) **upgrade**|[Renesas
RA4M1](https://en.wikipedia.org/wiki/Renesas_Electronics#The_RA_MCU_family)|Q1 2024|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_may_need_imp.png)| Academy|[Silicon Labs](https://en.wikipedia.org/wiki/Silicon_Labs)
[EFx32](https://en.wikipedia.org/wiki/EFM32)|Q3 2024|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_in_progress.png)| +Academy|[Nanjing Qinheng Microelectronics](https://www.wch-ic.com/)
[CH32V307](https://www.wch-ic.com/products/CH32V307.html)|Q3 2024|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_in_progress.png)|[RISC-V](https://en.wikipedia.org/wiki/RISC-V) ## By sub-1 GHz radio Radio|Model(s)|First appearance|       Status       |Notes @@ -127,6 +131,7 @@ Radio|Model(s)|First appearance|       Status [Texas Instruments
CC13x2R](http://www.ti.com/product/CC1352R)|[**Uni Edition**](https://github.com/lyusupov/SoftRF/wiki/Uni-Edition)|Q2 2020|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_good.png)|  [Maxim Integrated](https://en.wikipedia.org/wiki/Maxim_Integrated)
[MAX2837](https://www.maximintegrated.com/en/products/comms/wireless-rf/MAX2837.html) and
[MAX5864](https://www.maximintegrated.com/en/products/analog/data-converters/analog-front-end-ics/MAX5864.html)|[**ES Edition**](https://github.com/lyusupov/SoftRF/wiki/ES-Edition)|Q2 2021|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_may_need_imp.png)|**S**oftware
**D**efined
**R**adio [NiceRF](https://www.nicerf.com)
[SA868](https://www.nicerf.com/item/2w-embedded-walkie-talkie-module-sa868)|[**Ham Edition**](https://github.com/lyusupov/SoftRF/wiki/Ham-Edition)|Q3 2023|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_may_need_imp.png)|VHF or UHF "Ham Radio" bands +[Semtech
LR1110](https://www.semtech.com/products/wireless-rf/lora-edge/lr1110)|Card Edition|Q3 2024|![](https://github.com/lyusupov/SoftRF/raw/master/documents/images/icon_in_progress.png)|  ## By GNSS chip GNSS|Model(s)|First appearance|       Status       |Notes diff --git a/software/firmware/source/SoftRF/src/driver/radio/radiolib.cpp b/software/firmware/source/SoftRF/src/driver/radio/radiolib.cpp index b3b98a82d..88cb959e8 100644 --- a/software/firmware/source/SoftRF/src/driver/radio/radiolib.cpp +++ b/software/firmware/source/SoftRF/src/driver/radio/radiolib.cpp @@ -413,12 +413,12 @@ static void lr11xx_setup() switch (RF_FreqPlan.Bandwidth) { - case RF_RX_BANDWIDTH_SS_250KHZ: - bw = 500.0; /* BW_500 */ - break; case RF_RX_BANDWIDTH_SS_62KHZ: bw = 125.0; /* BW_125 */ break; + case RF_RX_BANDWIDTH_SS_250KHZ: + bw = 500.0; /* BW_500 */ + break; case RF_RX_BANDWIDTH_SS_125KHZ: default: bw = 250.0; /* BW_250 */ @@ -494,6 +494,8 @@ static void lr11xx_setup() bw = 117.3; break; case RF_RX_BANDWIDTH_SS_62KHZ: + bw = 156.2; + break; case RF_RX_BANDWIDTH_SS_100KHZ: bw = 234.3; break; @@ -616,6 +618,10 @@ static void lr11xx_setup() switch (hw_info.model) { case SOFTRF_MODEL_CARD: +#if 1 + radio->setDioAsRfSwitch(0x0f, 0x0, 0x09, 0x0B, 0x0A, 0x0, 0x4, 0x0); + state = radio->setTCXO(1.6); +#else { static const uint32_t rfswitch_dio_pins[] = { RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, @@ -638,6 +644,7 @@ static void lr11xx_setup() // LR1110 TCXO Voltage state = radio->setTCXO(1.6); } +#endif break; case SOFTRF_MODEL_NEO: diff --git a/software/firmware/source/libraries/OGN/freqplan.h b/software/firmware/source/libraries/OGN/freqplan.h index e0c414c1f..c31a8df8d 100644 --- a/software/firmware/source/libraries/OGN/freqplan.h +++ b/software/firmware/source/libraries/OGN/freqplan.h @@ -58,8 +58,8 @@ class FreqPlan case RF_BAND_AU: case RF_BAND_CN: /* ? */ BaseFreq = 920800000; - MaxTxPower = 15; Bandwidth = RF_RX_BANDWIDTH_SS_250KHZ; // BW500 + MaxTxPower = 15; break; case RF_BAND_IN: BaseFreq = 866200000;