-
Notifications
You must be signed in to change notification settings - Fork 967
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BOARD] Adds Waveshare ESP32-S3-PICO (#3081)
* Update architecture.h * Add files via upload * Add files via upload * Update EInkDisplay2.cpp * Update platformio.ini * Update architecture.h * Update EInkDisplay2.cpp * Update platformio.ini * Update EInkDisplay2.cpp * Update platformio.ini * Update EInkDisplay2.cpp --------- Co-authored-by: Ben Meadors <[email protected]> Co-authored-by: Thomas Göttgens <[email protected]>
- Loading branch information
1 parent
7a1c565
commit 23df6dd
Showing
6 changed files
with
197 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"build": { | ||
"arduino": { | ||
"ldscript": "esp32s3_out.ld", | ||
"partitions": "default_16MB.csv" | ||
}, | ||
"core": "esp32", | ||
"extra_flags": [ | ||
"-DARDUINO_ESP32S3_DEV", | ||
"-DARDUINO_USB_MODE=1", | ||
"-DARDUINO_RUNNING_CORE=1", | ||
"-DARDUINO_EVENT_RUNNING_CORE=1" | ||
], | ||
"f_cpu": "240000000L", | ||
"f_flash": "80000000L", | ||
"flash_mode": "qio", | ||
"hwids": [["0x303A", "0x1001"]], | ||
"mcu": "esp32s3", | ||
"variant": "esp32s3" | ||
}, | ||
"connectivity": ["wifi", "bluetooth", "lora"], | ||
"debug": { | ||
"default_tool": "esp-builtin", | ||
"onboard_tools": ["esp-builtin"], | ||
"openocd_target": "esp32s3.cfg" | ||
}, | ||
"frameworks": ["arduino", "espidf"], | ||
"name": "Waveshare ESP32-S3-Pico (16 MB FLASH, 2 MB PSRAM)", | ||
"upload": { | ||
"flash_size": "16MB", | ||
"maximum_ram_size": 327680, | ||
"maximum_size": 16777216, | ||
"use_1200bps_touch": true, | ||
"wait_for_upload_port": true, | ||
"require_upload_port": true, | ||
"speed": 921600 | ||
}, | ||
"url": "https://www.waveshare.com/esp32-s3-pico.htm", | ||
"vendor": "Waveshare" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#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 = 15; | ||
static const uint8_t SCL = 16; | ||
|
||
// Default SPI will be mapped to Radio | ||
static const uint8_t MISO = 37; | ||
static const uint8_t SCK = 35; | ||
static const uint8_t MOSI = 36; | ||
static const uint8_t SS = 14; | ||
|
||
static const uint8_t BAT_ADC_PIN = 26; | ||
|
||
// #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 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[env:ESP32-S3-Pico] | ||
|
||
board_level = extra | ||
extends = esp32s3_base | ||
upload_protocol = esptool | ||
board = esp32-s3-pico | ||
|
||
board_upload.use_1200bps_touch = yes | ||
board_upload.wait_for_upload_port = yes | ||
board_upload.require_upload_port = yes | ||
|
||
;upload_port = /dev/ttyACM0 | ||
|
||
build_flags = ${esp32_base.build_flags} | ||
-DESP32_S3_PICO | ||
;-DPRIVATE_HW | ||
-Ivariants/esp32-s3-pico | ||
-DBOARD_HAS_PSRAM | ||
-DTECHO_DISPLAY_MODEL=GxEPD2_290_T94_V2 | ||
-DEPD_HEIGHT=128 | ||
-DEPD_WIDTH=296 | ||
|
||
lib_deps = ${esp32s3_base.lib_deps} | ||
zinggjm/GxEPD2@^1.5.3 | ||
;adafruit/Adafruit NeoPixel@^1.10.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
*/ | ||
#define HAS_GPS 0 | ||
#undef GPS_RX_PIN | ||
#undef GPS_TX_PIN | ||
|
||
#define EXT_NOTIFY_OUT 22 | ||
#define BUTTON_PIN 0 // 17 | ||
|
||
// #define LED_PIN PIN_LED | ||
// Board has RGB LED 21 | ||
|
||
//The usbPower state is revered ? | ||
//DEBUG | ??:??:?? 365 [Power] Battery: usbPower=0, isCharging=0, batMv=4116, batPct=90 | ||
//DEBUG | ??:??:?? 385 [Power] Battery: usbPower=1, isCharging=1, batMv=4243, batPct=0 | ||
|
||
// https://www.waveshare.com/img/devkit/ESP32-S3-Pico/ESP32-S3-Pico-details-inter-1.jpg | ||
// digram is incorrect labeled as battery pin is getting readings on GPIO7_CH1? | ||
#define BATTERY_PIN 7 | ||
#define ADC_CHANNEL ADC1_GPIO7_CHANNEL | ||
// #define ADC_CHANNEL ADC1_GPIO6_CHANNEL | ||
// ratio of voltage divider = 3.0 (R17=200k, R18=100k) | ||
#define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic | ||
|
||
#define I2C_SDA 15 | ||
#define I2C_SCL 16 | ||
|
||
// Enable secondary bus for external periherals | ||
// https://www.waveshare.com/wiki/Pico-OLED-1.3 | ||
// #define USE_SH1107_128_64 | ||
// Not working | ||
#define I2C_SDA1 17 | ||
#define I2C_SCL1 18 | ||
|
||
#define BUTTON_PIN 0 // This is the BOOT button | ||
#define BUTTON_NEED_PULLUP | ||
|
||
// #define USE_RF95 // RFM95/SX127x | ||
#define USE_SX1262 | ||
// #define USE_SX1280 | ||
|
||
#define LORA_MISO 37 | ||
#define LORA_SCK 35 | ||
#define LORA_MOSI 36 | ||
#define LORA_CS 14 | ||
|
||
#define LORA_RESET 40 | ||
#define LORA_DIO1 4 | ||
#define LORA_DIO2 13 | ||
|
||
#ifdef USE_SX1262 | ||
#define SX126X_CS LORA_CS | ||
#define SX126X_DIO1 LORA_DIO1 | ||
#define SX126X_BUSY LORA_DIO2 | ||
#define SX126X_RESET LORA_RESET | ||
#define SX126X_DIO2_AS_RF_SWITCH | ||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8 | ||
#endif | ||
|
||
#ifdef USE_SX1280 | ||
#define SX128X_CS LORA_CS | ||
#define SX128X_DIO1 LORA_DIO1 | ||
#define SX128X_BUSY 9 | ||
#define SX128X_RESET LORA_RESET | ||
#endif | ||
|
||
#define USE_EINK | ||
/* | ||
* eink display pins | ||
*/ | ||
#define PIN_EINK_CS 34 | ||
#define PIN_EINK_BUSY 38 | ||
#define PIN_EINK_DC 33 | ||
#define PIN_EINK_RES 42 // 37 //(-1) // cant be MISO Waveshare ??) | ||
#define PIN_EINK_SCLK 35 | ||
#define PIN_EINK_MOSI 36 |