Fix 3.5" black screen: drive backlight on GPIO27, not GPIO21.

GPIO21 is GT911 INT on 3248S035C; PWM on the wrong pin left the panel dark.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-25 10:34:00 +08:00
parent 0a1b612cc9
commit 83b1bdc5f7
7 changed files with 13 additions and 15 deletions

View File

@@ -139,3 +139,4 @@ git reset --hard v1.1-case-snaps
| 2026-10-17 | 顶栏改单行,避免 up 文案被表盘面板盖住 |
| 2026-10-17 | 归档预编译固件到 `firmware/cyd_28r/`,附一键刷写脚本 |
| 2026-10-25 | 3.5" 表盘读数:数值+单位整体居中,数值变宽后不再盖住单位 |
| 2026-10-25 | 修复 3.5" 黑屏:背光改回 GPIO27(GPIO21 为 GT911 INT) |

View File

@@ -1,15 +1,11 @@
name: CYD temperature (cyd_35r)
git: de177b2
git: 0a1b612
date: 2026-10-25
board: ESP32-3248S035 (ST7796)
board: ESP32-3248S035 (ST7796 + GT911)
flash_size: 4MB
offsets:
0x1000 bootloader.bin
0x8000 partitions.bin
0xe000 boot_app0.bin
0x10000 firmware.bin
sha256:
bootloader.bin 3D234A7471F67B013686DABD4DEE7C1FA915C9928463616A94BC9297ACF1ABF8
boot_app0.bin F94C5D786A7A8FAB06AC5D10E33BF37711A6697636DC037559EA19CC410A17F0
firmware.bin A8033223DDE79874B4CA41AFE3DBB247938184123FB66BCAA6EAF7F5C1D32516
partitions.bin 0A8B5720E7B77FF11F1462458C3A509DEE79224E5279898F26D6A2E3AE0517B7
note: TFT_BL=GPIO27

Binary file not shown.

View File

@@ -73,8 +73,8 @@ if (Test-Path $metaPath) {
try {
$meta = Get-Content $metaPath -Raw | ConvertFrom-Json
$meta.boardId = $boardIdHint
if ($Env -eq "cyd_35r" -and $meta.name -notmatch "3\.5") {
$meta.name = ($meta.name -replace "\s*$","") + " (3.5\")"
if ($Env -eq "cyd_35r" -and $meta.name -notmatch '3\.5') {
$meta.name = ($meta.name -replace '\s*$','') + ' (3.5")'
}
$meta | ConvertTo-Json -Depth 8 | Set-Content -Encoding utf8 $metaPath
} catch {

View File

@@ -69,6 +69,7 @@ build_flags =
; Optional 3.5" CYD ESP32-3248S035C (ST7796 + GT911 capacitive). Default remains cyd_28r.
; Build: pio run -e cyd_35r
; Keep TOUCH_CS=-1 — GPIO33 is GT911 SDA, not resistive touch CS.
; TFT_BL=GPIO27 (not 21 — 21 is GT911 INT on C boards).
[env:cyd_35r]
lib_deps =
lvgl/lvgl@9.2.2
@@ -83,7 +84,7 @@ build_flags =
-DTFT_WIDTH=320
-DTFT_HEIGHT=480
-UTFT_BL
-DTFT_BL=21
-DTFT_BL=27
-DCYD_BOARD_3248S035=1
-DSUPPORT_TRANSACTIONS
-DTFT_RGB_ORDER=TFT_BGR

View File

@@ -1,6 +1,7 @@
/**
* CYD ESP32-2432S028R — LVGL 温湿度仪表盘
* DHT11 DATA -> GPIO22 (3.5 TFT_BL on GPIO21)
* DHT11 DATA -> GPIO22
* Backlight: 2.8" GPIO21, 3.5" GPIO27 (GT911 INT is GPIO21 — not BL)
*/
#include <Arduino.h>
@@ -12,7 +13,7 @@
#define DHT_PIN 22
#if defined(CYD_BOARD_3248S035)
#define TFT_BL_PIN 21
#define TFT_BL_PIN 27
#else
#define TFT_BL_PIN 21
#endif

View File

@@ -76,9 +76,8 @@ static void gt_hw_reset(bool addr_0x14) {
delay(5);
digitalWrite(CYD_GT911_INT, LOW);
delay(50);
/* INT shares TFT_BL on 3.5 — keep backlight HIGH after address select. */
pinMode(CYD_GT911_INT, OUTPUT);
digitalWrite(CYD_GT911_INT, HIGH);
/* Backlight is GPIO27 — leave INT as input for polling / optional IRQ. */
pinMode(CYD_GT911_INT, INPUT);
delay(50);
}