Skip to content

Commit

Permalink
Fixed: Tlora-t3s3-v1 SX1262 firmware reboots continuously (#2308) (#2315
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mverch67 authored Feb 28, 2023
1 parent 408c555 commit 9008c75
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion boards/tlora-t3s3-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"f_cpu": "240000000L",
"f_flash": "80000000L",
"flash_mode": "dio",
"hwids": [["0X303A", "0x1001"]],
"hwids": [["0x303A", "0x1001"]],
"mcu": "esp32s3",
"variant": "tlora-t3s3-v1"
},
Expand Down
1 change: 1 addition & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ default_envs = tbeam
;default_envs = tlora_v1_3
;default_envs = tlora-v2
;default_envs = tlora-v2-1-1.6
;default_envs = tlora-t3s3-v1
;default_envs = lora-relay-v1 # nrf board
;default_envs = t-echo
;default_envs = nrf52840dk-geeksville
Expand Down
26 changes: 13 additions & 13 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,19 +420,6 @@ void setup()
}
#endif

#if defined(USE_SX1280)
if (!rIf) {
rIf = new SX1280Interface(SX128X_CS, SX128X_DIO1, SX128X_RESET, SX128X_BUSY, SPI);
if (!rIf->init()) {
LOG_WARN("Failed to find SX1280 radio\n");
delete rIf;
rIf = NULL;
} else {
LOG_INFO("SX1280 Radio init succeeded, using SX1280 radio\n");
}
}
#endif

#if defined(USE_SX1262)
if (!rIf) {
rIf = new SX1262Interface(SX126X_CS, SX126X_DIO1, SX126X_RESET, SX126X_BUSY, SPI);
Expand Down Expand Up @@ -472,6 +459,19 @@ void setup()
}
#endif

#if defined(USE_SX1280)
if (!rIf) {
rIf = new SX1280Interface(SX128X_CS, SX128X_DIO1, SX128X_RESET, SX128X_BUSY, SPI);
if (!rIf->init()) {
LOG_WARN("Failed to find SX1280 radio\n");
delete rIf;
rIf = NULL;
} else {
LOG_INFO("SX1280 Radio init succeeded, using SX1280 radio\n");
}
}
#endif

// check if the radio chip matches the selected region

if ((config.lora.region == meshtastic_Config_LoRaConfig_RegionCode_LORA_24) && (!rIf->wideLora())) {
Expand Down
1 change: 1 addition & 0 deletions variants/tlora_t3s3_v1/platformio.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[env:tlora-t3s3-v1]
extends = esp32s3_base
board = tlora-t3s3-v1
upload_protocol = esp-builtin
lib_deps =
${esp32_base.lib_deps}
caveman99/ESP32 Codec2@^1.0.1
Expand Down
9 changes: 5 additions & 4 deletions variants/tlora_t3s3_v1/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@

#ifdef USE_SX1262
#define SX126X_CS RF95_NSS // FIXME - we really should define LORA_CS instead
#define SX126X_DIO1 LORA_DIO1
#define SX126X_BUSY 36
#define SX126X_DIO1 33
#define SX126X_BUSY 34
#define SX126X_RESET LORA_RESET
#define SX126X_RXEN 21
#define SX126X_TXEN 10
//#define SX126X_RXEN 21
//#define SX126X_TXEN 10
#define SX126X_E22
#endif

#ifdef USE_SX1280
Expand Down

1 comment on commit 9008c75

@geeksville
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/lilygo-t3s3-v1-1/7405/5

Please sign in to comment.