Skip to content

Commit 269ade1

Browse files
committed
feat: variants/seeed_xiao_nrf52840_wio-sx1262_v1_1 support Wio-SX1262 PCB v1.1 from deprecated DIY variant
Signed-off-by: Andrew Yong <[email protected]>
1 parent ecce7a1 commit 269ade1

File tree

2 files changed

+29
-11
lines changed

2 files changed

+29
-11
lines changed

variants/diy/platformio.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ build_flags =
9090
; XIAO nRF52840 & Wio-SX1262 Kit for Meshtastic - DIY builds
9191
; Make changes to pin definition overrides in ../seeed_xiao_nrf52840_kit/variant.h
9292

93+
; XIAO nRF52840 & Wio-SX1262 v1.1 PCB (XIAO ESP32S3 & Wio-SX1262 Kit ships with this PCB)
94+
; I2C defined for feature parity with removed diy/seeed-xiao-nrf52840-wio-sx1262 variant
95+
[env:seeed_xiao_nrf52840_wio-sx1262_v1_1]
96+
extends = env:seeed_xiao_nrf52840_kit
97+
build_flags = ${env:seeed_xiao_nrf52840_kit.build_flags} -DSEEED_XIAO_WIO1_1 -DSEEED_XIAO_D6D7_I2C
98+
9399
; XIAO nRF52840 & Wio-SX1262 Kit, with L76K GNSS Module for Seeed Studio XIAO
94100
; Store page: https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html
95101
[env:seeed_xiao_nrf52840_kit_l76k]

variants/seeed_xiao_nrf52840_kit/variant.h

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@ extern "C" {
6464
#define D9 (9ul)
6565
#define D10 (10ul)
6666

67-
// Wio-SX1262 for XIAO
68-
// Store page: https://www.seeedstudio.com/Wio-SX1262-for-XIAO-p-6379.html
69-
// Schematic: https://files.seeedstudio.com/products/SenseCAP/Wio_SX1262/Wio-SX1262%20for%20XIAO%20V1.0_SCH.pdf
70-
#define PIN_BUTTON1 D0
71-
#define BUTTON_NEED_PULLUP
72-
7367
/*
7468
* Analog pins
7569
*/
@@ -119,16 +113,36 @@ static const uint8_t SCK = PIN_SPI_SCK;
119113
// supported modules list
120114
#define USE_SX1262
121115

122-
// common pinouts for SX126X modules
116+
#ifdef SEEED_XIAO_WIO1_1
117+
// Wio-SX1262 PCB v1.1 pinout
118+
// XIAO ESP32S3 & Wio-SX1262 Kit ships with this PCB
119+
#define SX126X_CS D3
120+
#define SX126X_DIO1 D0
121+
#define SX126X_BUSY D1
122+
#define SX126X_RESET D2
123+
#define SX126X_RXEN 38
123124

125+
// Button on Wio-SX1262
126+
#define PIN_BUTTON1 D5
127+
#define BUTTON_NEED_PULLUP
128+
#else
129+
// Wio-SX1262 PCB v1.0 pinout
130+
// XIAO nRF52840 & Wio-SX1262 Kit ships with this PCB
124131
#define SX126X_CS D4
125132
#define SX126X_DIO1 D1
126133
#define SX126X_BUSY D3
127134
#define SX126X_RESET D2
135+
#define SX126X_RXEN D5 // This is used to control the RX side of the RF switch
128136

129-
#define SX126X_TXEN RADIOLIB_NC
137+
// Button on Wio-SX1262, it conflicts with the L76K GPS enable pin
138+
#ifdef SEEED_XIAO_D6D7_L76K
139+
#define PIN_BUTTON1 D0
140+
#define BUTTON_NEED_PULLUP
141+
#endif
142+
#endif
130143

131-
#define SX126X_RXEN D5 // This is used to control the RX side of the RF switch
144+
// RF switch strategy for Wio-SX1262
145+
#define SX126X_TXEN RADIOLIB_NC
132146
#define SX126X_DIO2_AS_RF_SWITCH // DIO2 is used to control the TX side of the RF switch
133147
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
134148

@@ -162,8 +176,6 @@ static const uint8_t SCL = PIN_WIRE_SCL;
162176
#define GPS_BAUDRATE 9600
163177
#define GPS_THREAD_INTERVAL 50
164178
#define PIN_GPS_STANDBY D0
165-
#undef PIN_BUTTON1 // Overlapping assignment with Wio-SX1262 for XIAO user button
166-
#define PIN_BUTTON1 (-1)
167179
#else
168180
#define HAS_GPS 0
169181
#endif

0 commit comments

Comments
 (0)