Skip to content

Commit 45c4cf5

Browse files
committed
Add support for SeeedStudio's XIAO ESP32-S3 Wio-SX1262 Header
1 parent 13c4c20 commit 45c4cf5

File tree

3 files changed

+128
-0
lines changed

3 files changed

+128
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
4+
#include <stdint.h>
5+
6+
#define USB_VID 0x2886
7+
#define USB_PID 0x0059
8+
9+
// GPIO48 Reference: https://github.com/espressif/arduino-esp32/pull/8600
10+
11+
// The default Wire will be mapped to Screen and Sensors
12+
static const uint8_t SDA = 47;
13+
static const uint8_t SCL = 48;
14+
15+
// Default SPI will be mapped to Radio
16+
static const uint8_t MISO = 8;
17+
static const uint8_t SCK = 7;
18+
static const uint8_t MOSI = 9;
19+
static const uint8_t SS = 5;
20+
21+
#endif /* Pins_Arduino_h */
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[env:seeed-xiao-s3-diy-header]
2+
board_level = extra
3+
extends = esp32s3_base
4+
board = seeed-xiao-s3-diy-header
5+
board_level = pr
6+
board_check = true
7+
board_build.partitions = default_8MB.csv
8+
upload_protocol = esptool
9+
upload_speed = 921600
10+
lib_deps =
11+
${esp32s3_base.lib_deps}
12+
build_unflags =
13+
${esp32s3_base.build_unflags}
14+
-DARDUINO_USB_MODE=1
15+
build_flags =
16+
${esp32s3_base.build_flags}
17+
-D SEEED_XIAO_S3
18+
-I variants/esp32s3/diy/seeed-xiao_esp32s3_diy_header
19+
-DBOARD_HAS_PSRAM
20+
-DARDUINO_USB_MODE=0
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄
3+
▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░▌
4+
▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌
5+
▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
6+
▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░▌ ▐░▌
7+
▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌
8+
▀▀▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░▌ ▐░▌
9+
▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌
10+
▄▄▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌
11+
▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░▌
12+
▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀
13+
14+
▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄
15+
▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
16+
▐░▌ ▐░▌ ▀▀▀▀█░█▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌ ▐░█▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀█░▌
17+
▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌
18+
▐░▐░▌ ▐░▌ ▐░█▄▄▄▄▄▄▄█░▌▐░▌ ▐░▌ ▐░█▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄█░▌
19+
▐░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
20+
▐░▌░▌ ▐░▌ ▐░█▀▀▀▀▀▀▀█░▌▐░▌ ▐░▌ ▀▀▀▀▀▀▀▀▀█░▌ ▀▀▀▀▀▀▀▀▀█░▌
21+
▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌
22+
▐░▌ ▐░▌ ▄▄▄▄█░█▄▄▄▄ ▐░▌ ▐░▌▐░█▄▄▄▄▄▄▄█░▌ ▄▄▄▄▄▄▄▄▄█░▌ ▄▄▄▄▄▄▄▄▄█░▌
23+
▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌▐░░░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
24+
▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀
25+
*/
26+
27+
/*
28+
Board Information: https://www.seeedstudio.com/XIAO-ESP32S3-p-5627.html
29+
Expansion Board Infomation : https://www.seeedstudio.com/Wio-SX1262-for-XIAO-p-6379.html
30+
L76K GPS Module Information : https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html
31+
*/
32+
33+
#define LED_PIN 48
34+
#define LED_STATE_ON 1 // State when LED is lit
35+
36+
#define BUTTON_PIN 21 // This is the Program Button
37+
#define BUTTON_NEED_PULLUP
38+
39+
#define BATTERY_PIN -1
40+
#define ADC_CHANNEL ADC1_GPIO1_CHANNEL
41+
#define BATTERY_SENSE_RESOLUTION_BITS 12
42+
43+
/*Warning:
44+
https://www.seeedstudio.com/L76K-GNSS-Module-for-Seeed-Studio-XIAO-p-5864.html
45+
L76K Expansion Board can not directly used, L76K Reset Pin needs to override or physically remove it,
46+
otherwise it will conflict with the SPI pins
47+
*/
48+
#define GPS_L76K
49+
#ifdef GPS_L76K
50+
#define GPS_RX_PIN 44
51+
#define GPS_TX_PIN 43
52+
#define HAS_GPS 1
53+
#define GPS_BAUDRATE 9600
54+
#define GPS_THREAD_INTERVAL 50
55+
#define PIN_SERIAL1_RX PIN_GPS_TX
56+
#define PIN_SERIAL1_TX PIN_GPS_RX
57+
#define PIN_GPS_STANDBY 1
58+
#endif
59+
60+
#define I2C_SDA 5
61+
#define I2C_SCL 6
62+
63+
// XIAO S3 LORA module
64+
#define USE_SX1262
65+
66+
#define LORA_MISO 8
67+
#define LORA_SCK 7
68+
#define LORA_MOSI 9
69+
#define LORA_CS 5
70+
71+
#define LORA_RESET 3
72+
#define LORA_DIO1 2
73+
74+
#define LORA_DIO2 6
75+
76+
#ifdef USE_SX1262
77+
#define SX126X_CS LORA_CS
78+
#define SX126X_DIO1 LORA_DIO1
79+
#define SX126X_BUSY 4
80+
#define SX126X_RESET LORA_RESET
81+
82+
// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3
83+
#define SX126X_DIO2_AS_RF_SWITCH
84+
#define SX126X_RXEN 6
85+
#define SX126X_TXEN RADIOLIB_NC
86+
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
87+
#endif

0 commit comments

Comments
 (0)