From d45dc6343b02583c7a91f1256fc49a3091e344fa Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Mon, 5 Oct 2026 20:12:39 -0500 Subject: [PATCH 1/4] wt32sc01-plus: pins from the datasheet (no LCD chip-select, SD on 38-41) and machine.I2C's freq=; the same keyword in ili9341_i80_rp2040 --- .../busdisplay/i80/ili9341_i80_rp2040/board_config.py | 2 +- board_configs/busdisplay/i80/wt32sc01-plus/board_config.py | 6 ++++-- .../busdisplay/i80/wt32sc01-plus/board_peripherals.py | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/board_configs/busdisplay/i80/ili9341_i80_rp2040/board_config.py b/board_configs/busdisplay/i80/ili9341_i80_rp2040/board_config.py index e5eea308..4b9110cc 100644 --- a/board_configs/busdisplay/i80/ili9341_i80_rp2040/board_config.py +++ b/board_configs/busdisplay/i80/ili9341_i80_rp2040/board_config.py @@ -34,7 +34,7 @@ power_pin=None, power_on_high=True, ) -i2c = I2C(0, sda=Pin(16), scl=Pin(17), frequency=100_000) +i2c = I2C(0, sda=Pin(16), scl=Pin(17), freq=100_000) touch = FT6x36(i2c) touch_rotation_table = None diff --git a/board_configs/busdisplay/i80/wt32sc01-plus/board_config.py b/board_configs/busdisplay/i80/wt32sc01-plus/board_config.py index fce80bdb..47ed7f81 100644 --- a/board_configs/busdisplay/i80/wt32sc01-plus/board_config.py +++ b/board_configs/busdisplay/i80/wt32sc01-plus/board_config.py @@ -13,9 +13,11 @@ # ST7796(reset=4) reset = Pin(4, Pin.OUT, value=1) +# Pins from the board's datasheet (Panlee ZX3D50CE02S-USRC-4832, Tab. 5). The +# LCD has no chip-select line; GPIO 6 is the touch controller's SDA. display_bus = I80Bus( command=0, - chip_select=6, + chip_select=None, write=47, data_pins=[9, 46, 3, 8, 18, 17, 16, 15], ) @@ -40,7 +42,7 @@ power_pin=None, power_on_high=True, ) -i2c = I2C(0, sda=Pin(6), scl=Pin(5), frequency=100_000) +i2c = I2C(0, sda=Pin(6), scl=Pin(5), freq=100_000) touch = FT6x36(i2c) touch_rotation_table = None diff --git a/board_configs/busdisplay/i80/wt32sc01-plus/board_peripherals.py b/board_configs/busdisplay/i80/wt32sc01-plus/board_peripherals.py index 4b40c246..976e70f5 100644 --- a/board_configs/busdisplay/i80/wt32sc01-plus/board_peripherals.py +++ b/board_configs/busdisplay/i80/wt32sc01-plus/board_peripherals.py @@ -10,12 +10,12 @@ def load_peripherals(ns): def sdcard(): - """SPI microSD when present (CS=GPIO41 common on WT32-SC01 Plus).""" + """The microSD slot over SPI (datasheet Tab. 4: CS 41, MOSI 40, CLK 39, MISO 38).""" from machine import Pin, SoftSPI from sdcard import SDCard - spi = SoftSPI(baudrate=1_000_000, sck=Pin(12), mosi=Pin(11), miso=Pin(13)) + spi = SoftSPI(baudrate=1_000_000, sck=Pin(39), mosi=Pin(40), miso=Pin(38)) return SDCard(spi, Pin(41, Pin.OUT, value=1)) From eb94494a82f12ffef6c4939e29c2a01d4ff9eb82 Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Mon, 5 Oct 2026 20:33:01 -0500 Subject: [PATCH 2/4] wt32sc01-plus: drive the i80 bus at 20 MHz; the bus's 30 MHz default shows noise on the ST7796 --- board_configs/busdisplay/i80/wt32sc01-plus/board_config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/board_configs/busdisplay/i80/wt32sc01-plus/board_config.py b/board_configs/busdisplay/i80/wt32sc01-plus/board_config.py index 47ed7f81..70f973a8 100644 --- a/board_configs/busdisplay/i80/wt32sc01-plus/board_config.py +++ b/board_configs/busdisplay/i80/wt32sc01-plus/board_config.py @@ -20,6 +20,7 @@ chip_select=None, write=47, data_pins=[9, 46, 3, 8, 18, 17, 16, 15], + frequency=20_000_000, # the bus's 30 MHz default is past what the ST7796 takes ) display_drv = ST7796( From a4b004f6ed736124032ea4ec31347893f740fdb8 Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Mon, 5 Oct 2026 20:54:13 -0500 Subject: [PATCH 3/4] wt32sc01-plus: 10 MHz on the i80 bus; 20 MHz still misplaced LVGL updates --- board_configs/busdisplay/i80/wt32sc01-plus/board_config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/board_configs/busdisplay/i80/wt32sc01-plus/board_config.py b/board_configs/busdisplay/i80/wt32sc01-plus/board_config.py index 70f973a8..f04421e0 100644 --- a/board_configs/busdisplay/i80/wt32sc01-plus/board_config.py +++ b/board_configs/busdisplay/i80/wt32sc01-plus/board_config.py @@ -20,7 +20,9 @@ chip_select=None, write=47, data_pins=[9, 46, 3, 8, 18, 17, 16, 15], - frequency=20_000_000, # the bus's 30 MHz default is past what the ST7796 takes + # 10 MHz, proven on the glass 2026-10-05: at the bus's 30 MHz default the + # panel showed noise, and at 20 MHz LVGL's updates landed on the wrong rows. + frequency=10_000_000, ) display_drv = ST7796( From d8a16a8c8f29c9e038dc6ac33d66a714a46bb3d7 Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Mon, 5 Oct 2026 20:58:22 -0500 Subject: [PATCH 4/4] wt32sc01-plus: 15 MHz, the ST7796's rated write speed, clean on the glass --- board_configs/busdisplay/i80/wt32sc01-plus/board_config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/board_configs/busdisplay/i80/wt32sc01-plus/board_config.py b/board_configs/busdisplay/i80/wt32sc01-plus/board_config.py index f04421e0..187b615c 100644 --- a/board_configs/busdisplay/i80/wt32sc01-plus/board_config.py +++ b/board_configs/busdisplay/i80/wt32sc01-plus/board_config.py @@ -20,9 +20,10 @@ chip_select=None, write=47, data_pins=[9, 46, 3, 8, 18, 17, 16, 15], - # 10 MHz, proven on the glass 2026-10-05: at the bus's 30 MHz default the - # panel showed noise, and at 20 MHz LVGL's updates landed on the wrong rows. - frequency=10_000_000, + # 15 MHz, the ST7796's rated write cycle (66 ns). Proven on the glass + # 2026-10-05: at the bus's 30 MHz default the panel showed noise, and at + # 20 MHz LVGL's updates landed on the wrong rows. + frequency=15_000_000, ) display_drv = ST7796(