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,97 @@
version: 1.0.0
# Devices Configuration for Wireless Tag WT32-SC01 Plus
#
# LCD: ST7796UI 480×320, 8-bit Intel 8080 parallel bus (SOC_LCD_I80_SUPPORTED)
# DC/RS: GPIO0 WR: GPIO47 DB[0..7]: GPIO9,46,3,8,18,17,16,15
# All hardware init done in setup_device.c (type: custom)
#
# Touch: FT6336U capacitive, ft5x06-compatible, over I2C
# SDA: GPIO6 SCL: GPIO5 INT: GPIO7 Shared reset: GPIO4
#
# SD Card: SPI mode on SPI2_HOST
# MOSI: GPIO40 MISO: GPIO38 SCK: GPIO39 CS: GPIO41
#
# CAN Bus (TWAI): TX: GPIO10 RX: GPIO11 (adjust to your wiring)

devices:

# ── LCD display (ST7796UI, 480×320, 8-bit I80 parallel) ──────────────────
# ESP32-S3 has SOC_LCD_I80_SUPPORTED but no PARLIO, so the native I80 bus
# is used. All init (bus, panel IO, ST7796) lives in setup_device.c.
- name: display_lcd
chip: st7796
type: custom
version: default
dependencies:
espressif/esp_lcd_st7796: "^1.3.0"
config:
lcd_width: 480
lcd_height: 320

# ── Touch panel (FT6336U / ft5x06-compatible, I2C 0x38) ─────────────────
- name: lcd_touch
chip: ft5x06
type: lcd_touch
sub_type: i2c
version: default
dependencies:
esp_lcd_touch:
version: "*"
require: public
espressif/esp_lcd_touch_ft5x06: "^1.0.7"
config:
io_i2c_config:
lcd_cmd_bits: 8
scl_speed_hz: 400000
flags:
dc_low_on_data: false
disable_control_phase: true
touch_config:
x_max: 320
y_max: 480
rst_gpio_num: -1 # reset shared with LCD, handled in setup_device.c
int_gpio_num: 7
levels:
reset: 0
interrupt: 0
flags:
swap_xy: true
mirror_x: false
mirror_y: false
peripherals:
- name: i2c_master
i2c_addr: [0x70] # FT6336U 7-bit 0x38 in 8-bit format (0x38 << 1)

# ── SD Card (SPI mode) ───────────────────────────────────────────────────
- name: fs_sdcard
type: fs_fat
sub_type: spi
version: default
init_skip: true
config:
sub_config:
cs_gpio_num: 41
frequency: SDMMC_FREQ_DEFAULT
peripherals:
- name: spi_master

# ── LCD backlight (LEDC PWM on GPIO45) ──────────────────────────────────
- name: lcd_brightness
type: ledc_ctrl
version: default
config:
default_percent: 100
peripherals:
- name: ledc_backlight

# ── CAN Bus (TWAI) — managed by lua_driver_canbus ────────────────────────
- name: can_bus
chip: twai
type: custom
version: default
init_skip: true
config:
tx_gpio: 10
rx_gpio: 11
bitrate: 500000
mode: normal
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
board: esp32s3_wt32_sc01_plus
chip: esp32s3
version: 1.0.0
description: "Wireless Tag WT32-SC01 Plus Smart Panel with 3.5-inch ST7796 IPS LCD and FT5x06 touch"
manufacturer: "Wireless Tag"
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: 1.0.0
# Peripherals Configuration for Wireless Tag WT32-SC01 Plus
#
# LCD: ST7796 (480x320), 8-bit Intel 8080 parallel bus (SOC_LCD_I80_SUPPORTED)
# DC/RS: GPIO0 WR: GPIO47 DB[0..7]: GPIO9,46,3,8,18,17,16,15
# Shared reset (LCD + touch): GPIO4 Backlight: GPIO45 (LEDC)
#
# Touch: FT6336U capacitive controller over I2C
# SDA: GPIO6 SCL: GPIO5 INT: GPIO7
#
# SD Card: SPI mode
# MOSI: GPIO40 MISO: GPIO38 SCK: GPIO39 CS: GPIO41
#
# CAN Bus (TWAI): TX: GPIO10 RX: GPIO11

peripherals:
# I2C bus — touch controller FT6336U (0x38)
- name: i2c_master
type: i2c
role: master
config:
port: 0
pins:
sda: 6
scl: 5

# SPI bus — SD card
- name: spi_master
type: spi
role: master
config:
spi_bus_config:
spi_port: SPI2_HOST
mosi_io_num: 40
miso_io_num: 38
sclk_io_num: 39
max_transfer_sz: 4092

# LCD backlight — LEDC PWM on GPIO45
- name: ledc_backlight
type: ledc
role: none
config:
gpio_num: 45
freq_hz: 5000
duty: 0
duty_resolution: LEDC_TIMER_10_BIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Wireless Tag WT32-SC01 Plus board defaults
# SoC: ESP32-S3-WROOM-1-N8R2 (8 MB QIO Flash, 2 MB Quad PSRAM)
# LCD: ST7796 480x320 via native I80 bus (SOC_LCD_I80_SUPPORTED)
# Touch: FT6336U via I2C (lcd_touch + sub_type: i2c)
#
# Note: if your module is N16R8 (16 MB flash, 8 MB Octal PSRAM), replace:
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB -> _16MB
# CONFIG_SPIRAM_MODE_QUAD -> CONFIG_SPIRAM_MODE_OCT

CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y

# Flash: 8 MB QIO 80 MHz
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"

# Quad PSRAM 2 MB 80 MHz
CONFIG_SPIRAM=y
CONFIG_SPIRAM_MODE_QUAD=y
CONFIG_SPIRAM_SPEED_80M=y

# Disable XIP-from-PSRAM: the global default enables it, but 2 MB PSRAM is not
# large enough to hold flash instructions + heap simultaneously.
# Code executes directly from flash cache instead.
CONFIG_SPIRAM_XIP_FROM_PSRAM=n
CONFIG_SPIRAM_FETCH_INSTRUCTIONS=n
CONFIG_SPIRAM_RODATA=n

# With XIP-from-PSRAM disabled, disabling the SPI flash cache (needed for
# any flash write: NVS, SPIFFS, OTA, …) also makes PSRAM inaccessible.
# If a task's stack is in PSRAM the CPU panics with
# "assert failed: esp_task_stack_is_sane_cache_disabled"
#
# The global defaults set SPIRAM_MALLOC_ALWAYSINTERNAL=0 (all malloc can go to
# PSRAM) and FREERTOS_TASK_CREATE_ALLOW_EXT_MEM=y (PSRAM stacks allowed).
# Both settings assume XIP-from-PSRAM is active. Override them here:
# ALWAYSINTERNAL=65536 → every alloc < 64 kB stays in internal DRAM,
# which covers all task stacks.
# TASK_CREATE_ALLOW_EXT_MEM=n → FreeRTOS refuses to start a task whose
# stack landed in PSRAM (fail fast at creation).
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=65536
CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM=n

# Enable LCD display (custom I80 device in setup_device.c)
CONFIG_ESP_BOARD_DEV_DISPLAY_LCD_SUPPORT=y

# Enable capacitive touch (FT6336U via lcd_touch + sub_type: i2c)
CONFIG_ESP_BOARD_DEV_LCD_TOUCH_SUPPORT=y
CONFIG_ESP_BOARD_DEV_LCD_TOUCH_SUB_I2C_SUPPORT=y
Loading