Add CYD 3.5C build: I2S on 22/21/35 with GT911 poll-only touch.

Export firmware/cyd_35r and document GPIO21 shared with GT911 INT.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-27 21:06:10 +08:00
parent 78658e3d62
commit 475f42a49d
9 changed files with 29 additions and 4 deletions

View File

@@ -28,7 +28,8 @@ ESP32 Cheap Yellow Display + INMP441(I2S)+ LVGL 声级仪表盘(近似 dB
| SCK | IO27(2.8)/ IO21(3.5) |
| SD | IO35(P3) |
> 不要接 5V;不要占用背光脚。I2S 需要三根信号线,仅 IO22+IO27 不够。
> 不要接 5V;不要占用背光脚。I2S 需要三根信号线,仅两根扩展脚不够(还要 P3 的 IO35)。
> **3.5C**:`SCK=GPIO21` 与 GT911 INT 同脚;固件先完成触控选址,再把 21 交给 I2S,触控仅轮询。背光是 **27**,勿当 SCK。
## 功能
@@ -95,6 +96,7 @@ README.md
| 日期 | 说明 |
|------|------|
| 2026-10-27 | 兼容 3.5C(`cyd_35r`):WS22/SCK21/SD35、BL27、GT911 Wire1 轮询;导出 `firmware/cyd_35r` |
| 2026-10-27 | 文档补充实测读数:安静约 55–60、说话/拍手 70+;说明为相对声级、绝对未标定 |
| 2026-10-27 | 修复无声贝变化:I2S 改立体声读槽(ESP32 L/R 与麦脚常反相)+ 去直流后再算 RMS |
| 2026-10-27 | 初版:INMP441 I2S 声贝仪表盘(WS22/SCK27/SD35),LVGL 圆弧 + peak/min/max + 趋势图 |

View File

@@ -0,0 +1,17 @@
name: CYD inmp441test (cyd_35r)
git: 78658e3
date: 2026-10-27
board: ESP32-3248S035 (ST7796 + GT911)
inmp441: WS=GPIO22 SCK=GPIO21 SD=GPIO35
tft_bl: GPIO27
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 54A9F577980859E69E06F28982A632245AB3D67C99893C8B6996C510E25DC205
partitions.bin 0A8B5720E7B77FF11F1462458C3A509DEE79224E5279898F26D6A2E3AE0517B7

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,4 +1,4 @@
# Flash archived CYD SGP30 firmware (no rebuild needed)
# Flash archived CYD INMP441 sound-meter firmware for 3.5C (no rebuild needed)
# Usage:
# .\flash.ps1
# .\flash.ps1 -Port COM5

Binary file not shown.

View File

@@ -591,10 +591,14 @@ void setup() {
lv_version_major(), lv_version_minor(), lv_version_patch(),
I2S_WS_PIN, I2S_SCK_PIN, I2S_SD_PIN, TFT_BL_PIN);
/* 3.5: GT911 may pulse INT(=21) during addr select; release before I2S SCK. */
touch_init();
bool ok = mic_init();
Serial.println(ok ? "I2S mic OK" : "I2S mic FAIL — check wiring");
#if defined(CYD_BOARD_3248S035)
Serial.println("3.5C: SCK=GPIO21 (shared GT911 INT; touch is poll-only)");
#endif
lv_init();

View File

@@ -6,7 +6,9 @@
* 2.8": XPT2046 resistive SoftSPI bus (CS33).
* 3.5C (3248S035C): GT911 capacitive on Wire1 SDA33/SCL32/INT21/RST25.
* Feed coords are always native panel 320x480 for LVGL ROTATION_270.
* Wire1 leaves Wire free for SGP30 (3.5: SDA22/SCL21; TFT_BL=27).
* Wire1 keeps GT911 off the INMP441 pins (WS22 / SCK21). After touch_init(),
* main claims GPIO21 as I2S BCK — touch stays poll-only (no INT IRQ).
* TFT_BL=27 on 3.5C.
*/
static int16_t clampi(int32_t v, int32_t lo, int32_t hi) {
@@ -76,7 +78,7 @@ static void gt_hw_reset(bool addr_0x14) {
delay(5);
digitalWrite(CYD_GT911_INT, LOW);
delay(50);
/* Backlight is GPIO27 — release INT(21) as input (may share SCL for SGP30). */
/* BL=27. Release INT(21) before main reuses it as INMP441 I2S SCK. */
pinMode(CYD_GT911_INT, INPUT);
delay(50);
}