mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-26 01:52:48 +00:00
TLORA_T3_S3
This commit is contained in:
parent
6f6ca64cfd
commit
430908f5d6
47
boards/tlora-t3s3-v1.json
Normal file
47
boards/tlora-t3s3-v1.json
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
"build": {
|
||||||
|
"arduino": {
|
||||||
|
"ldscript": "esp32s3_out.ld"
|
||||||
|
},
|
||||||
|
"core": "esp32",
|
||||||
|
"extra_flags": [
|
||||||
|
"-DLILYGO_T3S3_V1",
|
||||||
|
"-DARDUINO_USB_CDC_ON_BOOT=1",
|
||||||
|
"-DARDUINO_USB_MODE=0",
|
||||||
|
"-DARDUINO_RUNNING_CORE=1",
|
||||||
|
"-DARDUINO_EVENT_RUNNING_CORE=1"
|
||||||
|
],
|
||||||
|
"f_cpu": "240000000L",
|
||||||
|
"f_flash": "80000000L",
|
||||||
|
"flash_mode": "dio",
|
||||||
|
"hwids": [
|
||||||
|
[
|
||||||
|
"0X303A",
|
||||||
|
"0x1001"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"mcu": "esp32s3",
|
||||||
|
"variant": "tlora-t3s3-v1"
|
||||||
|
},
|
||||||
|
"connectivity": [
|
||||||
|
"wifi"
|
||||||
|
],
|
||||||
|
"debug": {
|
||||||
|
"openocd_target": "esp32s3.cfg"
|
||||||
|
},
|
||||||
|
"frameworks": [
|
||||||
|
"arduino",
|
||||||
|
"espidf"
|
||||||
|
],
|
||||||
|
"name": "LilyGo TLora-T3S3-V1",
|
||||||
|
"upload": {
|
||||||
|
"flash_size": "4MB",
|
||||||
|
"maximum_ram_size": 327680,
|
||||||
|
"maximum_size": 4194304,
|
||||||
|
"wait_for_upload_port": true,
|
||||||
|
"require_upload_port": true,
|
||||||
|
"speed": 921600
|
||||||
|
},
|
||||||
|
"url": "http://www.lilygo.cn/",
|
||||||
|
"vendor": "LilyGo"
|
||||||
|
}
|
@ -1 +1 @@
|
|||||||
Subproject commit 0985b94c20287552daf63831fd9eda4e0ed1bd0e
|
Subproject commit 05209dee1b8fe4376c221eabd29fc165273edd43
|
12
src/main.cpp
12
src/main.cpp
@ -242,7 +242,6 @@ void setup()
|
|||||||
digitalWrite(PIN_3V3_EN, 1);
|
digitalWrite(PIN_3V3_EN, 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Currently only the tbeam has a PMU
|
// Currently only the tbeam has a PMU
|
||||||
// PMU initialization needs to be placed before scanI2Cdevice
|
// PMU initialization needs to be placed before scanI2Cdevice
|
||||||
power = new Power();
|
power = new Power();
|
||||||
@ -462,17 +461,6 @@ if((config.lora.region == Config_LoRaConfig_RegionCode_LORA_24) && (!rIf->wideLo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if((config.lora.region != Config_LoRaConfig_RegionCode_LORA_24) && (rIf->wideLora())){
|
|
||||||
DEBUG_MSG("Warning: Radio chip only supports 2.4GHz LoRa. Adjusting Region.\n");
|
|
||||||
config.lora.region = Config_LoRaConfig_RegionCode_LORA_24;
|
|
||||||
nodeDB.saveToDisk(SEGMENT_CONFIG);
|
|
||||||
if(!rIf->reconfigure()) {
|
|
||||||
DEBUG_MSG("Reconfigure failed, rebooting\n");
|
|
||||||
screen->startRebootScreen();
|
|
||||||
rebootAtMsec = millis() + 5000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#if HAS_WIFI || HAS_ETHERNET
|
#if HAS_WIFI || HAS_ETHERNET
|
||||||
mqttInit();
|
mqttInit();
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "SX128xInterface.h"
|
#include "SX128xInterface.h"
|
||||||
|
#include "mesh/NodeDB.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
|
||||||
// Particular boards might define a different max power based on what their hardware can do
|
// Particular boards might define a different max power based on what their hardware can do
|
||||||
@ -50,6 +51,20 @@ bool SX128xInterface<T>::init()
|
|||||||
// \todo Display actual typename of the adapter, not just `SX128x`
|
// \todo Display actual typename of the adapter, not just `SX128x`
|
||||||
DEBUG_MSG("SX128x init result %d\n", res);
|
DEBUG_MSG("SX128x init result %d\n", res);
|
||||||
|
|
||||||
|
if((config.lora.region != Config_LoRaConfig_RegionCode_LORA_24) && (res == RADIOLIB_ERR_INVALID_FREQUENCY)) {
|
||||||
|
DEBUG_MSG("Warning: Radio chip only supports 2.4GHz LoRa. Adjusting Region and rebooting.\n");
|
||||||
|
config.lora.region = Config_LoRaConfig_RegionCode_LORA_24;
|
||||||
|
nodeDB.saveToDisk(SEGMENT_CONFIG);
|
||||||
|
delay(2000);
|
||||||
|
#if defined(ARCH_ESP32)
|
||||||
|
ESP.restart();
|
||||||
|
#elif defined(ARCH_NRF52)
|
||||||
|
NVIC_SystemReset();
|
||||||
|
#else
|
||||||
|
DEBUG_MSG("FIXME implement reboot for this platform. Skipping for now.\n");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
DEBUG_MSG("Frequency set to %f\n", getFreq());
|
DEBUG_MSG("Frequency set to %f\n", getFreq());
|
||||||
DEBUG_MSG("Bandwidth set to %f\n", bw);
|
DEBUG_MSG("Bandwidth set to %f\n", bw);
|
||||||
DEBUG_MSG("Power output set to %d\n", power);
|
DEBUG_MSG("Power output set to %d\n", power);
|
||||||
|
@ -54,6 +54,8 @@ typedef enum _HardwareModel {
|
|||||||
HardwareModel_NANO_G1 = 14,
|
HardwareModel_NANO_G1 = 14,
|
||||||
/* TODO: REPLACE */
|
/* TODO: REPLACE */
|
||||||
HardwareModel_TLORA_V2_1_1P8 = 15,
|
HardwareModel_TLORA_V2_1_1P8 = 15,
|
||||||
|
/* TODO: REPLACE */
|
||||||
|
HardwareModel_TLORA_T3_S3 = 16,
|
||||||
/* B&Q Consulting Station Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:station */
|
/* B&Q Consulting Station Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:station */
|
||||||
HardwareModel_STATION_G1 = 25,
|
HardwareModel_STATION_G1 = 25,
|
||||||
/* Less common/prototype boards listed here (needs one more byte over the air) */
|
/* Less common/prototype boards listed here (needs one more byte over the air) */
|
||||||
|
@ -88,6 +88,8 @@
|
|||||||
#define HW_VENDOR HardwareModel_HELTEC_V3
|
#define HW_VENDOR HardwareModel_HELTEC_V3
|
||||||
#elif defined(HELTEC_WSL_V3)
|
#elif defined(HELTEC_WSL_V3)
|
||||||
#define HW_VENDOR HardwareModel_HELTEC_WSL_V3
|
#define HW_VENDOR HardwareModel_HELTEC_WSL_V3
|
||||||
|
#elif defined(TLORA_T3S3_V1)
|
||||||
|
#define HW_VENDOR HardwareModel_TLORA_T3_S3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
|
34
variants/tlora_t3s3_v1/pins_arduino.h
Normal file
34
variants/tlora_t3s3_v1/pins_arduino.h
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
#ifndef Pins_Arduino_h
|
||||||
|
#define Pins_Arduino_h
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define USB_VID 0x303a
|
||||||
|
#define USB_PID 0x1001
|
||||||
|
|
||||||
|
#define EXTERNAL_NUM_INTERRUPTS 46
|
||||||
|
#define NUM_DIGITAL_PINS 48
|
||||||
|
#define NUM_ANALOG_INPUTS 20
|
||||||
|
|
||||||
|
#define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
|
||||||
|
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
|
||||||
|
#define digitalPinHasPWM(p) (p < 46)
|
||||||
|
|
||||||
|
// The default Wire will be mapped to PMU and RTC
|
||||||
|
static const uint8_t SDA = 18;
|
||||||
|
static const uint8_t SCL = 17;
|
||||||
|
|
||||||
|
// Default SPI will be mapped to Radio
|
||||||
|
static const uint8_t SS = 7;
|
||||||
|
static const uint8_t MOSI = 6;
|
||||||
|
static const uint8_t MISO = 3;
|
||||||
|
static const uint8_t SCK = 5;
|
||||||
|
|
||||||
|
#define SPI_MOSI (11)
|
||||||
|
#define SPI_SCK (14)
|
||||||
|
#define SPI_MISO (2)
|
||||||
|
#define SPI_CS (13)
|
||||||
|
|
||||||
|
#define SDCARD_CS SPI_CS
|
||||||
|
|
||||||
|
#endif /* Pins_Arduino_h */
|
9
variants/tlora_t3s3_v1/platformio.ini
Normal file
9
variants/tlora_t3s3_v1/platformio.ini
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[env:tlora-t3s3-v1]
|
||||||
|
extends = esp32s3_base
|
||||||
|
board = tlora-t3s3-v1
|
||||||
|
lib_deps =
|
||||||
|
${esp32_base.lib_deps}
|
||||||
|
caveman99/ESP32 Codec2@^1.0.1
|
||||||
|
|
||||||
|
build_flags =
|
||||||
|
${esp32_base.build_flags} -D TLORA_T3S3_V1 -I variants/tlora_t3s3_v1
|
54
variants/tlora_t3s3_v1/variant.h
Normal file
54
variants/tlora_t3s3_v1/variant.h
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
#undef GPS_RX_PIN
|
||||||
|
#undef GPS_TX_PIN
|
||||||
|
|
||||||
|
#define HAS_SDCARD
|
||||||
|
#define SDCARD_USE_SPI1
|
||||||
|
|
||||||
|
#define USE_SSD1306
|
||||||
|
|
||||||
|
#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||||
|
// ratio of voltage divider = 2.0 (R42=100k, R43=100k)
|
||||||
|
#define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.
|
||||||
|
|
||||||
|
#define I2C_SDA 18 // I2C pins for this board
|
||||||
|
#define I2C_SCL 17
|
||||||
|
|
||||||
|
#define LED_PIN 37 // If defined we will blink this LED
|
||||||
|
#define BUTTON_PIN 0 // If defined, this will be used for user button presses,
|
||||||
|
|
||||||
|
#define BUTTON_NEED_PULLUP
|
||||||
|
|
||||||
|
// TTGO uses a common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if
|
||||||
|
// not found then probe for SX1262
|
||||||
|
#define USE_RF95 // RFM95/SX127x
|
||||||
|
#define USE_SX1262
|
||||||
|
#define USE_SX1280
|
||||||
|
|
||||||
|
#define RF95_SCK 5
|
||||||
|
#define RF95_MISO 3
|
||||||
|
#define RF95_MOSI 6
|
||||||
|
#define RF95_NSS 7
|
||||||
|
|
||||||
|
#define LORA_RESET 8
|
||||||
|
#define LORA_DIO0 9
|
||||||
|
#define LORA_DIO1 9
|
||||||
|
#define LORA_DIO2 33 // SX1262 BUSY
|
||||||
|
#define LORA_DIO3 34 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled
|
||||||
|
|
||||||
|
#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_RESET LORA_RESET
|
||||||
|
#define SX126X_RXEN 21
|
||||||
|
#define SX126X_TXEN 10
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_SX1280
|
||||||
|
#define SX128X_CS RF95_NSS
|
||||||
|
#define SX128X_DIO1 LORA_DIO1
|
||||||
|
#define SX128X_BUSY 36
|
||||||
|
#define SX128X_RESET LORA_RESET
|
||||||
|
#define SX128X_RXEN 21
|
||||||
|
#define SX128X_TXEN 10
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user