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:
@@ -139,3 +139,4 @@ git reset --hard v1.1-case-snaps
|
|||||||
| 2026-10-17 | 顶栏改单行,避免 up 文案被表盘面板盖住 |
|
| 2026-10-17 | 顶栏改单行,避免 up 文案被表盘面板盖住 |
|
||||||
| 2026-10-17 | 归档预编译固件到 `firmware/cyd_28r/`,附一键刷写脚本 |
|
| 2026-10-17 | 归档预编译固件到 `firmware/cyd_28r/`,附一键刷写脚本 |
|
||||||
| 2026-10-25 | 3.5" 表盘读数:数值+单位整体居中,数值变宽后不再盖住单位 |
|
| 2026-10-25 | 3.5" 表盘读数:数值+单位整体居中,数值变宽后不再盖住单位 |
|
||||||
|
| 2026-10-25 | 修复 3.5" 黑屏:背光改回 GPIO27(GPIO21 为 GT911 INT) |
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
name: CYD temperature (cyd_35r)
|
name: CYD temperature (cyd_35r)
|
||||||
git: de177b2
|
git: 0a1b612
|
||||||
date: 2026-10-25
|
date: 2026-10-25
|
||||||
board: ESP32-3248S035 (ST7796)
|
board: ESP32-3248S035 (ST7796 + GT911)
|
||||||
flash_size: 4MB
|
flash_size: 4MB
|
||||||
offsets:
|
offsets:
|
||||||
0x1000 bootloader.bin
|
0x1000 bootloader.bin
|
||||||
0x8000 partitions.bin
|
0x8000 partitions.bin
|
||||||
0xe000 boot_app0.bin
|
0xe000 boot_app0.bin
|
||||||
0x10000 firmware.bin
|
0x10000 firmware.bin
|
||||||
sha256:
|
note: TFT_BL=GPIO27
|
||||||
bootloader.bin 3D234A7471F67B013686DABD4DEE7C1FA915C9928463616A94BC9297ACF1ABF8
|
|
||||||
boot_app0.bin F94C5D786A7A8FAB06AC5D10E33BF37711A6697636DC037559EA19CC410A17F0
|
|
||||||
firmware.bin A8033223DDE79874B4CA41AFE3DBB247938184123FB66BCAA6EAF7F5C1D32516
|
|
||||||
partitions.bin 0A8B5720E7B77FF11F1462458C3A509DEE79224E5279898F26D6A2E3AE0517B7
|
|
||||||
|
|||||||
Binary file not shown.
@@ -73,8 +73,8 @@ if (Test-Path $metaPath) {
|
|||||||
try {
|
try {
|
||||||
$meta = Get-Content $metaPath -Raw | ConvertFrom-Json
|
$meta = Get-Content $metaPath -Raw | ConvertFrom-Json
|
||||||
$meta.boardId = $boardIdHint
|
$meta.boardId = $boardIdHint
|
||||||
if ($Env -eq "cyd_35r" -and $meta.name -notmatch "3\.5") {
|
if ($Env -eq "cyd_35r" -and $meta.name -notmatch '3\.5') {
|
||||||
$meta.name = ($meta.name -replace "\s*$","") + " (3.5\")"
|
$meta.name = ($meta.name -replace '\s*$','') + ' (3.5")'
|
||||||
}
|
}
|
||||||
$meta | ConvertTo-Json -Depth 8 | Set-Content -Encoding utf8 $metaPath
|
$meta | ConvertTo-Json -Depth 8 | Set-Content -Encoding utf8 $metaPath
|
||||||
} catch {
|
} catch {
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ build_flags =
|
|||||||
; Optional 3.5" CYD ESP32-3248S035C (ST7796 + GT911 capacitive). Default remains cyd_28r.
|
; Optional 3.5" CYD ESP32-3248S035C (ST7796 + GT911 capacitive). Default remains cyd_28r.
|
||||||
; Build: pio run -e cyd_35r
|
; Build: pio run -e cyd_35r
|
||||||
; Keep TOUCH_CS=-1 — GPIO33 is GT911 SDA, not resistive touch CS.
|
; 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]
|
[env:cyd_35r]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
lvgl/lvgl@9.2.2
|
lvgl/lvgl@9.2.2
|
||||||
@@ -83,7 +84,7 @@ build_flags =
|
|||||||
-DTFT_WIDTH=320
|
-DTFT_WIDTH=320
|
||||||
-DTFT_HEIGHT=480
|
-DTFT_HEIGHT=480
|
||||||
-UTFT_BL
|
-UTFT_BL
|
||||||
-DTFT_BL=21
|
-DTFT_BL=27
|
||||||
-DCYD_BOARD_3248S035=1
|
-DCYD_BOARD_3248S035=1
|
||||||
-DSUPPORT_TRANSACTIONS
|
-DSUPPORT_TRANSACTIONS
|
||||||
-DTFT_RGB_ORDER=TFT_BGR
|
-DTFT_RGB_ORDER=TFT_BGR
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* CYD ESP32-2432S028R — LVGL 温湿度仪表盘
|
* 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>
|
#include <Arduino.h>
|
||||||
@@ -12,7 +13,7 @@
|
|||||||
|
|
||||||
#define DHT_PIN 22
|
#define DHT_PIN 22
|
||||||
#if defined(CYD_BOARD_3248S035)
|
#if defined(CYD_BOARD_3248S035)
|
||||||
#define TFT_BL_PIN 21
|
#define TFT_BL_PIN 27
|
||||||
#else
|
#else
|
||||||
#define TFT_BL_PIN 21
|
#define TFT_BL_PIN 21
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -76,9 +76,8 @@ static void gt_hw_reset(bool addr_0x14) {
|
|||||||
delay(5);
|
delay(5);
|
||||||
digitalWrite(CYD_GT911_INT, LOW);
|
digitalWrite(CYD_GT911_INT, LOW);
|
||||||
delay(50);
|
delay(50);
|
||||||
/* INT shares TFT_BL on 3.5 — keep backlight HIGH after address select. */
|
/* Backlight is GPIO27 — leave INT as input for polling / optional IRQ. */
|
||||||
pinMode(CYD_GT911_INT, OUTPUT);
|
pinMode(CYD_GT911_INT, INPUT);
|
||||||
digitalWrite(CYD_GT911_INT, HIGH);
|
|
||||||
delay(50);
|
delay(50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user