feat: variant seeed_xiao_nrf52840_wio-sx1262_v1_1: supports Wio-SX1262 PCB v1.1

Signed-off-by: Andrew Yong <me@ndoo.sg>
This commit is contained in:
Andrew Yong 2025-05-12 02:13:29 +08:00
parent ab4f68fb01
commit bbfac7a594
2 changed files with 29 additions and 11 deletions

View File

@ -103,6 +103,12 @@ build_flags =
; XIAO nRF52840 & Wio-SX1262 Kit for Meshtastic - DIY builds ; XIAO nRF52840 & Wio-SX1262 Kit for Meshtastic - DIY builds
; Make changes to pin definition overrides in ../seeed_xiao_nrf52840_kit/variant.h ; Make changes to pin definition overrides in ../seeed_xiao_nrf52840_kit/variant.h
; XIAO nRF52840 & Wio-SX1262 v1.1 PCB (XIAO ESP32S3 & Wio-SX1262 Kit ships with this PCB)
; I2C defined for feature parity with removed diy/seeed-xiao-nrf52840-wio-sx1262 variant
[env:seeed_xiao_nrf52840_wio-sx1262_v1_1]
extends = env:seeed_xiao_nrf52840_kit
build_flags = ${env:seeed_xiao_nrf52840_kit.build_flags} -DSEEED_XIAO_WIO1_1 -DSEEED_XIAO_D6D7_I2C
; XIAO nRF52840 & Wio-SX1262 Kit, with L76K GNSS Module for Seeed Studio XIAO ; XIAO nRF52840 & Wio-SX1262 Kit, with L76K GNSS Module for Seeed Studio XIAO
; Store page: https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html ; Store page: https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html
[env:seeed_xiao_nrf52840_kit_l76k] [env:seeed_xiao_nrf52840_kit_l76k]

View File

@ -64,12 +64,6 @@ extern "C" {
#define D9 (9ul) #define D9 (9ul)
#define D10 (10ul) #define D10 (10ul)
// Wio-SX1262 for XIAO
// Store page: https://www.seeedstudio.com/Wio-SX1262-for-XIAO-p-6379.html
// Schematic: https://files.seeedstudio.com/products/SenseCAP/Wio_SX1262/Wio-SX1262%20for%20XIAO%20V1.0_SCH.pdf
#define PIN_BUTTON1 D0
#define BUTTON_NEED_PULLUP
/* /*
* Analog pins * Analog pins
*/ */
@ -119,16 +113,36 @@ static const uint8_t SCK = PIN_SPI_SCK;
// supported modules list // supported modules list
#define USE_SX1262 #define USE_SX1262
// common pinouts for SX126X modules #ifdef SEEED_XIAO_WIO1_1
// Wio-SX1262 PCB v1.1 pinout
// XIAO ESP32S3 & Wio-SX1262 Kit ships with this PCB
#define SX126X_CS D3
#define SX126X_DIO1 D0
#define SX126X_BUSY D1
#define SX126X_RESET D2
#define SX126X_RXEN 38
// Button on Wio-SX1262
#define PIN_BUTTON1 D5
#define BUTTON_NEED_PULLUP
#else
// Wio-SX1262 PCB v1.0 pinout
// XIAO nRF52840 & Wio-SX1262 Kit ships with this PCB
#define SX126X_CS D4 #define SX126X_CS D4
#define SX126X_DIO1 D1 #define SX126X_DIO1 D1
#define SX126X_BUSY D3 #define SX126X_BUSY D3
#define SX126X_RESET D2 #define SX126X_RESET D2
#define SX126X_TXEN RADIOLIB_NC
#define SX126X_RXEN D5 // This is used to control the RX side of the RF switch #define SX126X_RXEN D5 // This is used to control the RX side of the RF switch
// Button on Wio-SX1262, it conflicts with the L76K GPS enable pin
#ifdef SEEED_XIAO_D6D7_L76K
#define PIN_BUTTON1 D0
#define BUTTON_NEED_PULLUP
#endif
#endif
// RF switch strategy for Wio-SX1262
#define SX126X_TXEN RADIOLIB_NC
#define SX126X_DIO2_AS_RF_SWITCH // DIO2 is used to control the TX side of the RF switch #define SX126X_DIO2_AS_RF_SWITCH // DIO2 is used to control the TX side of the RF switch
#define SX126X_DIO3_TCXO_VOLTAGE 1.8 #define SX126X_DIO3_TCXO_VOLTAGE 1.8
@ -162,8 +176,6 @@ static const uint8_t SCL = PIN_WIRE_SCL;
#define GPS_BAUDRATE 9600 #define GPS_BAUDRATE 9600
#define GPS_THREAD_INTERVAL 50 #define GPS_THREAD_INTERVAL 50
#define PIN_GPS_STANDBY D0 #define PIN_GPS_STANDBY D0
#undef PIN_BUTTON1 // Overlapping assignment with Wio-SX1262 for XIAO user button
#define PIN_BUTTON1 (-1)
#else #else
#define HAS_GPS 0 #define HAS_GPS 0
#endif #endif