mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-29 13:12:04 +00:00
Merge branch 'master' into t5-epaper-pro
This commit is contained in:
11
variants/esp32s3/tbeam-s3-core/rfswitch.h
Normal file
11
variants/esp32s3/tbeam-s3-core/rfswitch.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "RadioLib.h"
|
||||
|
||||
static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};
|
||||
|
||||
static const Module::RfSwitchMode_t rfswitch_table[] = {
|
||||
// mode DIO5 DIO6
|
||||
{LR11x0::MODE_STBY, {LOW, LOW}}, {LR11x0::MODE_RX, {HIGH, LOW}},
|
||||
{LR11x0::MODE_TX, {LOW, HIGH}}, {LR11x0::MODE_TX_HP, {LOW, HIGH}},
|
||||
{LR11x0::MODE_TX_HF, {LOW, LOW}}, {LR11x0::MODE_GNSS, {LOW, LOW}},
|
||||
{LR11x0::MODE_WIFI, {LOW, LOW}}, END_OF_MODE_TABLE,
|
||||
};
|
||||
@@ -15,6 +15,7 @@
|
||||
// not found then probe for SX1262
|
||||
#define USE_SX1262
|
||||
#define USE_SX1268
|
||||
#define USE_LR1121
|
||||
|
||||
#define LORA_DIO0 -1 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 5
|
||||
@@ -34,6 +35,19 @@
|
||||
// code)
|
||||
#endif
|
||||
|
||||
// LR1121
|
||||
#ifdef USE_LR1121
|
||||
#define LR1121_IRQ_PIN 1
|
||||
#define LR1121_NRESET_PIN LORA_RESET
|
||||
#define LR1121_BUSY_PIN 4
|
||||
#define LR1121_SPI_NSS_PIN 10
|
||||
#define LR1121_SPI_SCK_PIN 12
|
||||
#define LR1121_SPI_MOSI_PIN 11
|
||||
#define LR1121_SPI_MISO_PIN 13
|
||||
#define LR11X0_DIO3_TCXO_VOLTAGE 3.0
|
||||
#define LR11X0_DIO_AS_RF_SWITCH
|
||||
#endif
|
||||
|
||||
// Leave undefined to disable our PMU IRQ handler. DO NOT ENABLE THIS because the pmuirq can cause sperious interrupts
|
||||
// and waking from light sleep
|
||||
// #define PMU_IRQ 40
|
||||
@@ -64,4 +78,4 @@
|
||||
// has 32768 Hz crystal
|
||||
#define HAS_32768HZ 1
|
||||
|
||||
#define USE_SH1106
|
||||
#define USE_SH1106
|
||||
@@ -210,6 +210,16 @@ No longer populated on PCB
|
||||
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0
|
||||
#define ADC_MULTIPLIER (4.916F)
|
||||
|
||||
// rf52840 AIN2 = Pin 4
|
||||
#define BATTERY_LPCOMP_INPUT NRF_LPCOMP_INPUT_2
|
||||
|
||||
// We have AIN2 with a VBAT divider so AIN2 = VBAT * (100/490)
|
||||
// We have the device going deep sleep under 3.1V, which is AIN2 = 0.63V
|
||||
// So we can wake up when VBAT>=VDD is restored to 3.3V, where AIN2 = 0.67V
|
||||
// Ratio 0.67/3.3 = 0.20, so we can pick a bit higher, 2/8 VDD, which means
|
||||
// VBAT=4.04V
|
||||
#define BATTERY_LPCOMP_THRESHOLD NRF_LPCOMP_REF_SUPPLY_2_8
|
||||
|
||||
#define HAS_RTC 0
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ No longer populated on PCB
|
||||
#undef AREF_VOLTAGE
|
||||
#define AREF_VOLTAGE 3.0
|
||||
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0
|
||||
#define ADC_MULTIPLIER (4.90F)
|
||||
#define ADC_MULTIPLIER (4.6425F)
|
||||
|
||||
#undef HAS_GPS
|
||||
#define HAS_GPS 0
|
||||
@@ -129,4 +129,4 @@ No longer populated on PCB
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -267,6 +267,20 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
||||
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0
|
||||
#define ADC_MULTIPLIER 1.73
|
||||
|
||||
// RAK4630 AIN0 = nrf52840 AIN3 = Pin 5
|
||||
#define BATTERY_LPCOMP_INPUT NRF_LPCOMP_INPUT_3
|
||||
|
||||
// We have AIN3 with a VBAT divider so AIN3 = VBAT * (1.5/2.5)
|
||||
// We have the device going deep sleep under 3.1V, which is AIN3 = 1.86V
|
||||
// So we can wake up when VBAT>=VDD is restored to 3.3V, where AIN3 = 1.98V
|
||||
// 1.98/3.3 = 6/10, but that's close to the VBAT divider, so we
|
||||
// pick 6/8VDD, which means VBAT=4.1V.
|
||||
// Reference:
|
||||
// VDD=3.3V AIN3=5/8*VDD=2.06V VBAT=1.66*AIN3=3.41V
|
||||
// VDD=3.3V AIN3=11/16*VDD=2.26V VBAT=1.66*AIN3=3.76V
|
||||
// VDD=3.3V AIN3=6/8*VDD=2.47V VBAT=1.66*AIN3=4.1V
|
||||
#define BATTERY_LPCOMP_THRESHOLD NRF_LPCOMP_REF_SUPPLY_11_16
|
||||
|
||||
#define HAS_RTC 1
|
||||
|
||||
#define HAS_ETHERNET 1
|
||||
|
||||
@@ -15,7 +15,7 @@ Do not expect a working Meshtastic device with this target.
|
||||
#define USE_STM32WLx
|
||||
|
||||
#define LED_PIN PB5
|
||||
#define LED_STATE_ON 1
|
||||
#define LED_STATE_ON 0
|
||||
|
||||
#define WIO_E5
|
||||
|
||||
|
||||
Reference in New Issue
Block a user