diff --git a/README.md b/README.md index 6d368ed..8976d2f 100644 --- a/README.md +++ b/README.md @@ -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 + 趋势图 | diff --git a/firmware/cyd_35r/VERSION.txt b/firmware/cyd_35r/VERSION.txt new file mode 100644 index 0000000..4b7d2c3 --- /dev/null +++ b/firmware/cyd_35r/VERSION.txt @@ -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 diff --git a/firmware/cyd_35r/boot_app0.bin b/firmware/cyd_35r/boot_app0.bin new file mode 100644 index 0000000..13562ca Binary files /dev/null and b/firmware/cyd_35r/boot_app0.bin differ diff --git a/firmware/cyd_35r/bootloader.bin b/firmware/cyd_35r/bootloader.bin new file mode 100644 index 0000000..d592359 Binary files /dev/null and b/firmware/cyd_35r/bootloader.bin differ diff --git a/firmware/cyd_35r/firmware.bin b/firmware/cyd_35r/firmware.bin new file mode 100644 index 0000000..5122dbc Binary files /dev/null and b/firmware/cyd_35r/firmware.bin differ diff --git a/firmware/cyd_35r/flash.ps1 b/firmware/cyd_35r/flash.ps1 index a586008..c2521b3 100644 --- a/firmware/cyd_35r/flash.ps1 +++ b/firmware/cyd_35r/flash.ps1 @@ -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 diff --git a/firmware/cyd_35r/partitions.bin b/firmware/cyd_35r/partitions.bin new file mode 100644 index 0000000..21800fa Binary files /dev/null and b/firmware/cyd_35r/partitions.bin differ diff --git a/src/main.cpp b/src/main.cpp index f573ba7..9a5db5b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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(); diff --git a/src/touch.cpp b/src/touch.cpp index fec313a..542862a 100644 --- a/src/touch.cpp +++ b/src/touch.cpp @@ -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); }