Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LR1110 support #3013

Merged
merged 33 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e2803fe
DOES NOT WORK
caveman99 Dec 14, 2023
9bdfe66
trunk
caveman99 Dec 14, 2023
29bbe36
Merge branch 'master' into wio-dev-1110
thebentern Dec 14, 2023
d7726ca
Merge branch 'master' into wio-dev-1110
thebentern Dec 14, 2023
73d4763
DOES NOT WORK
caveman99 Dec 14, 2023
71d6211
trunk
caveman99 Dec 14, 2023
fbb2cee
Merge branch 'wio-dev-1110' of https://github.com/meshtastic/firmware…
caveman99 Apr 21, 2024
a13d997
DOES NOT WORK
caveman99 Dec 14, 2023
07e667b
trunk
caveman99 Dec 14, 2023
789d3c9
Merge branch 'wio-dev-1110' of https://github.com/meshtastic/firmware…
caveman99 May 4, 2024
1b2adf5
WIP: LR11x0 non functional interface code. Please don't expect a work…
caveman99 May 9, 2024
67a94d2
Merge remote-tracking branch 'remotes/origin/master' into wio-dev-1110
caveman99 May 9, 2024
b42d1dd
trunk fmt
caveman99 May 9, 2024
0c7ba24
use canon toolchain
caveman99 May 9, 2024
7d44122
Merge branch 'master' into wio-dev-1110
caveman99 May 11, 2024
7ab6b8a
update and fix radiolib dependency
caveman99 May 11, 2024
5c20e55
Merge branch 'master' into wio-dev-1110
caveman99 May 12, 2024
671aebe
Switch Radiolib back to GIT checkout
caveman99 May 13, 2024
5fb8202
Merge branch 'master' into wio-dev-1110
caveman99 May 13, 2024
2779ea4
Merge branch 'master' into wio-dev-1110
caveman99 May 15, 2024
1fedf52
enable tcxo and fix startReceive
caveman99 May 15, 2024
8b7d1cc
Merge branch 'master' into wio-dev-1110
caveman99 May 15, 2024
393d6ab
Merge branch 'master' into wio-dev-1110
caveman99 May 16, 2024
59d6e09
progress
caveman99 May 16, 2024
7314ee6
Correct midjudgement on scope of build defines.
caveman99 May 16, 2024
8e1b1f7
- enable peripheral power rail during startup init
caveman99 May 17, 2024
8df08a4
Merge branch 'master' into wio-dev-1110
caveman99 May 18, 2024
0fdbedf
add tracker pinout variant
caveman99 May 24, 2024
ef7d169
Merge branch 'master' into wio-dev-1110
caveman99 May 25, 2024
eecfa40
Merge branch 'master' into wio-dev-1110
caveman99 May 27, 2024
ac1d6d5
Merge branch 'master' into wio-dev-1110
caveman99 Jun 3, 2024
ee55f8f
update to radiolib 6.6.0 API (aka: godmode is not for mere mortals)
caveman99 Jun 3, 2024
bb99d0e
tracker is not so 'extra' any more
caveman99 Jun 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions boards/wio-sdk-wm1110.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"build": {
"arduino": {
"ldscript": "nrf52840_s140_v6.ld"
},
"core": "nRF5",
"cpu": "cortex-m4",
"extra_flags": "-DARDUINO_WIO_WM1110 -DNRF52840_XXAA",
"f_cpu": "64000000L",
"hwids": [
["0x239A", "0x8029"],
["0x239A", "0x0029"],
["0x239A", "0x002A"],
["0x239A", "0x802A"]
],
"usb_product": "WIO-BOOT",
"mcu": "nrf52840",
"variant": "Seeed_WIO_WM1110",
"bsp": {
"name": "adafruit"
},
"softdevice": {
"sd_flags": "-DS140",
"sd_name": "s140",
"sd_version": "6.1.1",
"sd_fwid": "0x00B6"
},
"bootloader": {
"settings_addr": "0xFF000"
}
},
"connectivity": ["bluetooth"],
"debug": {
"jlink_device": "nRF52840_xxAA",
"svd_path": "nrf52840.svd"
},
"frameworks": ["arduino"],
"name": "Seeed WIO WM1110",
"upload": {
"maximum_ram_size": 248832,
"maximum_size": 815104,
"speed": 115200,
"protocol": "nrfutil",
"protocols": [
"jlink",
"nrfjprog",
"nrfutil",
"stlink",
"cmsis-dap",
"blackmagic"
],
"use_1200bps_touch": true,
"require_upload_port": true,
"wait_for_upload_port": true
},
"url": "https://www.seeedstudio.com/Wio-WM1110-Dev-Kit-p-5677.html",
"vendor": "Seeed Studio"
}
58 changes: 58 additions & 0 deletions boards/wio-tracker-wm1110.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"build": {
"arduino": {
"ldscript": "nrf52840_s140_v6.ld"
},
"core": "nRF5",
"cpu": "cortex-m4",
"extra_flags": "-DARDUINO_WIO_WM1110 -DNRF52840_XXAA",
"f_cpu": "64000000L",
"hwids": [
["0x239A", "0x8029"],
["0x239A", "0x0029"],
["0x239A", "0x002A"],
["0x239A", "0x802A"]
],
"usb_product": "WIO-BOOT",
"mcu": "nrf52840",
"variant": "Seeed_WIO_WM1110",
"bsp": {
"name": "adafruit"
},
"softdevice": {
"sd_flags": "-DS140",
"sd_name": "s140",
"sd_version": "6.1.1",
"sd_fwid": "0x00B6"
},
"bootloader": {
"settings_addr": "0xFF000"
}
},
"connectivity": ["bluetooth"],
"debug": {
"jlink_device": "nRF52840_xxAA",
"svd_path": "nrf52840.svd"
},
"frameworks": ["arduino"],
"name": "Seeed WIO WM1110",
"upload": {
"maximum_ram_size": 248832,
"maximum_size": 815104,
"speed": 115200,
"protocol": "nrfutil",
"protocols": [
"jlink",
"nrfjprog",
"nrfutil",
"stlink",
"cmsis-dap",
"blackmagic"
],
"use_1200bps_touch": true,
"require_upload_port": true,
"wait_for_upload_port": true
},
"url": "https://www.seeedstudio.com/Wio-WM1110-Dev-Kit-p-5677.html",
"vendor": "Seeed Studio"
}
13 changes: 12 additions & 1 deletion src/detect/LoRaRadioType.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#pragma once

enum LoRaRadioType { NO_RADIO, STM32WLx_RADIO, SIM_RADIO, RF95_RADIO, SX1262_RADIO, SX1268_RADIO, LLCC68_RADIO, SX1280_RADIO };
enum LoRaRadioType {
NO_RADIO,
STM32WLx_RADIO,
SIM_RADIO,
RF95_RADIO,
SX1262_RADIO,
SX1268_RADIO,
LLCC68_RADIO,
SX1280_RADIO,
LR1110_RADIO,
LR1120_RADIO
};

extern LoRaRadioType radioType;
28 changes: 28 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ NRF52Bluetooth *nrf52Bluetooth;
#endif

#include "LLCC68Interface.h"
#include "LR1110Interface.h"
#include "LR1120Interface.h"
#include "RF95Interface.h"
#include "SX1262Interface.h"
#include "SX1268Interface.h"
Expand Down Expand Up @@ -882,6 +884,32 @@ void setup()
}
#endif

#if defined(USE_LR1110)
if (!rIf) {
rIf = new LR1110Interface(RadioLibHAL, LR1110_SPI_NSS_PIN, LR1110_IRQ_PIN, LR1110_NRESER_PIN, LR1110_BUSY_PIN);
if (!rIf->init()) {
LOG_WARN("Failed to find LR1110 radio\n");
delete rIf;
rIf = NULL;
} else {
LOG_INFO("LR1110 Radio init succeeded, using LR1110 radio\n");
}
}
#endif

#if defined(USE_LR1120)
if (!rIf) {
rIf = new LR1120Interface(RadioLibHAL, LR1120_SPI_NSS_PIN, LR1120_IRQ_PIN, LR1120_NRESER_PIN, LR1120_BUSY_PIN);
if (!rIf->init()) {
LOG_WARN("Failed to find LR1120 radio\n");
delete rIf;
rIf = NULL;
} else {
LOG_INFO("LR1120 Radio init succeeded, using LR1120 radio\n");
}
}
#endif

#if defined(USE_SX1280)
if (!rIf) {
rIf = new SX1280Interface(RadioLibHAL, SX128X_CS, SX128X_DIO1, SX128X_RESET, SX128X_BUSY);
Expand Down
4 changes: 4 additions & 0 deletions src/mesh/InterfacesTemplates.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include "LR11x0Interface.cpp"
#include "LR11x0Interface.h"
#include "SX126xInterface.cpp"
#include "SX126xInterface.h"
#include "SX128xInterface.cpp"
Expand All @@ -10,6 +12,8 @@ template class SX126xInterface<SX1262>;
template class SX126xInterface<SX1268>;
template class SX126xInterface<LLCC68>;
template class SX128xInterface<SX1280>;
template class LR11x0Interface<LR1110>;
template class LR11x0Interface<LR1120>;
#ifdef ARCH_STM32WL
template class SX126xInterface<STM32WLx>;
#endif
Expand Down
9 changes: 9 additions & 0 deletions src/mesh/LR1110Interface.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "LR1110Interface.h"
#include "configuration.h"
#include "error.h"

LR1110Interface::LR1110Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
RADIOLIB_PIN_TYPE busy)
: LR11x0Interface(hal, cs, irq, rst, busy)
{
}
13 changes: 13 additions & 0 deletions src/mesh/LR1110Interface.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

#include "LR11x0Interface.h"

/**
* Our adapter for LR1110 radios
*/
class LR1110Interface : public LR11x0Interface<LR1110>
{
public:
LR1110Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
RADIOLIB_PIN_TYPE busy);
};
9 changes: 9 additions & 0 deletions src/mesh/LR1120Interface.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "LR1120Interface.h"
#include "configuration.h"
#include "error.h"

LR1120Interface::LR1120Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
RADIOLIB_PIN_TYPE busy)
: LR11x0Interface(hal, cs, irq, rst, busy)
{
}
13 changes: 13 additions & 0 deletions src/mesh/LR1120Interface.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

#include "LR11x0Interface.h"

/**
* Our adapter for LR1120 wideband radios
*/
class LR1120Interface : public LR11x0Interface<LR1120>
{
public:
LR1120Interface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst,
RADIOLIB_PIN_TYPE busy);
};
Loading
Loading