Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
version: 1.0.0
# Devices Configuration for Adafruit Metro ESP32-S3
devices:

# On-board NeoPixel on GPIO46
- name: led_strip
chip: ws2812
type: custom
version: default
init_skip: true
dependencies:
espressif/led_strip:
version: "^3.0"
public: true
config:
max_leds: 1
peripherals:
- name: rmt_tx

# ILI9341 TFT on the default SPI bus.
# NOTE: CS / DC / RST pins below are placeholders — update them to match
# how you've wired the display to the Metro. Any free GPIO on the Metro
# will work; the values here (10/11/12) are chosen only because those pins
# are broken out on the Arduino header and are otherwise unused.
- name: display_lcd
chip: ili9341
type: display_lcd
sub_type: spi
version: default
dependencies:
espressif/esp_lcd_ili9341: "*"
config:
mirror_x: true
mirror_y: false
swap_xy: false
x_max: 240 # native ILI9341 portrait: 240 wide x 320 tall
y_max: 320
invert_color: false # flip to true if reds/blues look wrong
io_spi_config:
cs_gpio_num: 10
dc_gpio_num: 9
spi_mode: 0
pclk_hz: 40000000
flags:
sio_mode: false # true only for 3-wire SPI (MOSI shared with MISO)

lcd_panel_config:
reset_gpio_num: -1 # <-- set to your ILI9341 RST pin, or -1 if tied high
rgb_ele_order: LCD_RGB_ELEMENT_ORDER_BGR
bits_per_pixel: 16
data_endian: LCD_RGB_DATA_ENDIAN_BIG
flags:
reset_active_high: false

peripherals:
- name: spi_display
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
board: metro_esp32s3
chip: esp32s3
description: "Adafruit Metro ESP32-S3 (16MB flash / 8MB OPI PSRAM)"
manufacturer: "Adafruit"
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
version: 1.0.0
# Peripherals Configuration for Adafruit Metro ESP32-S3

peripherals:
# RMT TX used by the on-board NeoPixel (GPIO46)
- name: rmt_tx
type: rmt
role: tx
config:
gpio_num: 46
clk_src: RMT_CLK_SRC_DEFAULT
resolution_hz: 10000000
mem_block_symbols: 64
trans_queue_depth: 4
intr_priority: 1
flags:
invert_out: false
with_dma: true
io_loop_back: false
io_od_mode: false
allow_pd: false
init_level: false

# Default I2C bus on the STEMMA QT / Qwiic connector (SDA=47, SCL=48)
- name: i2c_master
type: i2c
role: master
config:
port: 0
pins:
sda: 47
scl: 48

# SPI bus used by the ILI9341 display.
# Matches the Metro's default SPI header: SCK=39, MOSI=42, MISO=21.
- name: spi_display
type: spi
role: master
config:
spi_bus_config:
spi_port: SPI3_HOST
data0_io_num: 42 # MOSI
sclk_io_num: 39 # SCK
max_transfer_sz: 6400 # 320 * 2 * 10
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y

# Adafruit Metro ESP32-S3: 16MB QIO flash @ 80MHz
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_16MB.csv"

# 8MB OPI PSRAM @ 80MHz
CONFIG_SPIRAM=y
CONFIG_SPIRAM_MODE_OCT=y
CONFIG_SPIRAM_SPEED_80M=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <string.h>
#include "esp_log.h"
#include "esp_check.h"
#include "esp_board_manager_includes.h"
#include "gen_board_device_custom.h"
#include "periph_rmt.h"
#include "led_strip.h"
#include "led_strip_rmt.h"
#include "led_strip_types.h"
#include "esp_lcd_ili9341.h"

static const char *TAG = "ADAFRUIT_METRO_ESP32S3_SETUP_DEVICE";

esp_err_t lcd_panel_factory_entry_t(esp_lcd_panel_io_handle_t io, const esp_lcd_panel_dev_config_t *panel_dev_config, esp_lcd_panel_handle_t *ret_panel)
{
esp_lcd_panel_dev_config_t panel_dev_cfg = {0};
memcpy(&panel_dev_cfg, panel_dev_config, sizeof(esp_lcd_panel_dev_config_t));
esp_err_t ret = esp_lcd_new_panel_ili9341(io, &panel_dev_cfg, ret_panel);
if (ret != ESP_OK) {
ESP_LOGE(TAG, "New ili9341 panel failed");
}
return ret;
}
13 changes: 13 additions & 0 deletions docs/src/flash-tool/firmware.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@
}
},
"esp32s3": {
"adafruit": {
"metro_esp32s3": {
"features": [],
"description": "",
"merged_binary": "/merged_binary/metro_esp32s3.bin",
"min_flash_size": 16,
"min_psram_size": 8,
"nvs_info": {
"start_addr": "0x9000",
"size": "0x6000"
}
}
},
"dfrobot": {
"dfrobot_k10": {
"features": [],
Expand Down