Repository navigation
Releases
v1.3.5 — no dimming on the cable, and the battery charges
v1.3.5 — the clock no longer dims itself on a charging cable, and the battery actually charges.
v1.3.5 —— 插着充电线的时钟不再自己变暗,电池也终于真的在充。
A desk clock on a cable is the one case where the screen has to stay up: it is being looked at, and it is not spending the pack. v1.3.5 teaches the power save the difference between the two, and it turns the charger on.
插在桌上的时钟正是最不该省电的那一种用法——它是拿来被看的,也没在花电池。v1.3.5 让省电分得清这两种状态,并把充电真正打开。
English
What was wrong
Two failures, both of them visible on a bench test:
- Plugged in, the screen still went dark. Left on the charging cable, the rain dimmed to 25 % after 2 minutes, dropped to 8 fps after 3 and killed its own backlight after 10 — exactly backwards for a clock that lives on a desk.
- The plug never charged the pack. A cable powered the clock while the battery just sat there: measured, the pack current with the charger "on" was ≈0 mA and the pack voltage never rose.
The root of (1) is that this board has no VBUS-present input anywhere. The only cable-adjacent signals are the charger's status line (IO expander #2, P6 — the pin M5's own bsp_usb_c_detect() reads, and which is really CHG_STAT, a charging status: low in trickle, high in constant current) and the INA226's pack current. A rule built on "is it charging?" answers the wrong question: with a full pack on a cable the pin reads low at −1 mA — the charger feeding the load while the pack idles — so the clock concluded "no cable" and dimmed itself.
The root of (2) is that M5Unified's IO-expander bring-up only reads the chip ID; it never writes a direction or an output register. Nothing on this build ever drove CHG_EN, so the IP2326 stayed disabled and a plug only fed the system.
What changed
- The verdict is the INA226 pack current, and nothing else. "A cable is in" ⟺ the pack is not being drained. That single number means the same thing in every way this clock is used, measured on hardware: charging ⇒ +513 mA (so "+ = into the pack" is verified on this board instead of assumed), full pack on a cable ⇒ ≈0 mA, no pack fitted at all ⇒ ≈0 mA, battery alone ⇒ the whole system load leaves the pack — hundreds of mA, clearly negative. The charger's status pin rides along in the log but is deliberately out of the verdict: with the charger unpowered it can sit high, and a pin that reports "charging" on battery is how two earlier attempts kept the screen awake until the pack died.
- A one-minute grace window (
USB_DET_LATCH_MS) absorbs the charger's own short dips below the threshold, so the verdict cannot flicker while the cable is in. - Charging is switched on at boot —
initCharging(): QC enable → 50 ms →CHG_ENhigh, then the register is read back so the outcome is visible in the log:[POWER] charging: P7(CHG_EN)=1 P5(QC_EN)=0 out=0x89. - The panel tells you which source is in use.
Setup → Aboutnow carries aPowerline:Power USB-C (idle dimming off)orPower battery (idle dimming on). - Verified both ways on the device. Ten minutes on the cable with no dimming; pull the cable and the whole chain comes back (dim → slower → dark), with a touch restoring it.
- Nothing else changed. Same UI kit, same rain engine, same time path, same WiFi wizard.
Flash it
M5Burner (no toolchain): download matrix-rain-tab5-v1.3.5.zip below → M5Burner → Custom → Import Custom FW → pick the .zip → select Matrix Rain Clock → Burn.
Or from source:
git clone https://github.com/andjiang0083/matrix-rain-tab5.git
cd matrix-rain-tab5
~/.platformio/penv/bin/pio run -e tab5
~/.platformio/penv/bin/pio run -e tab5 --target upload --upload-port /dev/cu.usbmodemXXXX⚠️ Upgrading an already-set-up device: the WiFi password is erased
A merged image spans the NVS partition at 0x9000, so writing one at 0x0 wipes the saved WiFi credentials and the device boots into the setup wizard. Nothing is broken — enter the password again, and you can read what you type. To keep the credentials, write only the app partition (the bootloader and the partition table do not change between releases):
python3 -m esptool --chip esp32p4 -p /dev/cu.usbmodemXXXX write-flash \
0x10000 .pio/build/tab5/firmware.bin --flash-mode dio --flash-freq 80m --flash-size 16MBFirmware version (paste this when reporting a bug)
=== MATRIX RAIN v1.3.5 (Boot NTP + RTC + confirm screen + WiFi-setup) ===
The two power lines that come with it, one at boot and one per cable transition, are what made this fix decidable on hardware:
[POWER] charging: P7(CHG_EN)=1 P5(QC_EN)=0 out=0x89 readOk=1
[POWER] USB-C det: pin=1 attached=1 pulled=1 | INA226 513 mA / 8380 mV
[POWER] USB-C removed (pin=0, -312 mA) — idle power save armed
Assets
| File | What it is |
|---|---|
matrix-rain-tab5-v1.3.5.bin |
DIO merged image (bootloader @ 0x2000 + partition table + app), written from 0x0. |
matrix-rain-tab5-v1.3.5.zip |
M5Burner import bundle: the catalogue JSON + the same .bin + first-boot notes. |
sha256sums.txt |
Checksums for both files. |
The bootloader / partition table / boot_app0 region is byte-for-byte identical to v1.3.4 — the check run before every release to confirm the merge offsets and flash mode have not drifted (drift is what causes "works from PlatformIO, black screen from M5Burner").
shasum -a 256:
8b2b78e5651f430261af81d97ed01b2c73c17567efdf8d6fe0be63787080bef7 matrix-rain-tab5-v1.3.5.bin
5c102ccea0ddfc48c1fbc0da6eb14fc7c30a4e29dac6dba3d4584ebaccd96e8d matrix-rain-tab5-v1.3.5.zip
Still limited (unchanged)
- No light sleep — idle drops the brightness and the frame rate, but the CPU keeps running.
- Fixed UTC offsets, no daylight-saving rules.
- Chinese / non-ASCII SSIDs render as
□(ASCII font and keyboard). - Audio (ES8388) and the IMU (BMI270) are still unused. The fuel gauge (INA226) is now read for the mains/battery verdict, but there is still no on-screen battery percentage — the About line is the only readout.
Licence: MIT. The Matrix is a Warner Bros. trademark; this is an unofficial fan project with no film assets. Full credits in CREDITS.md.
中文
问题是什么
两个毛病,台面上都看得见:
- 插着线,屏幕照样灭。 放在充电线上的雨,2 分钟后降到 25% 亮度、3 分钟后降到 8fps、10 分钟后把自己的背光关掉——对一台摆在桌上的时钟来说,这正好是反的。
- 插上线,电池根本没充。 线只是给时钟供电,电包一动不动:实测"充电中"的电包电流 ≈0mA,电包电压一直不涨。
(1) 的根子是这块板上没有任何"VBUS 在场"的输入。离"线"最近的两个信号是充电芯片的状态线(IO 扩展器 #2 的 P6——M5 自己的 bsp_usb_c_detect() 读的就是它,而它其实是 CHG_STAT,一个充电状态:涓流时低、恒流时高)和 INA226 的电包电流。用"是否在充电"当判据,问的是错的问题:电包充满又插着线时,那根脚读出来是低电平、只有 −1mA——充电器在给整机供电、电包闲着——于是时钟认为"没插线",把自己调暗了。
(2) 的根子是 M5Unified 拉 IO 扩展器只读 chip ID,从不写方向寄存器或输出寄存器。本版本的构建里没有任何东西驱动过 CHG_EN,IP2326 一直处于关闭状态,插线只是给整机供电。
改了什么
- 判据只看 INA226 的电包电流,别的都不看。 "插着线" ⟺ 电包没有在被抽。这一个数字在时钟的所有用法下含义都一样,且都在真机上量过:充电 ⇒ +513mA(所以"+ = 进包"是实测验证过的,不是照抄注释)、插着线且电包满 ⇒ ≈0mA、不装电包 ⇒ ≈0mA、只有电池 ⇒ 整机负载全部从电包流出,几百 mA,明显为负。充电芯片的状态脚只进日志、不进判据:没有充电器时它可能是高的,而"电池供电却报充电中"正是前两版把屏幕一直留亮到电包耗尽的原因。
- 一分钟宽限期(
USB_DET_LATCH_MS)吸收充电器自身短暂跌到门槛以下的瞬间,插着线时判据不会来回跳。 - 开机就把充电打开——
initCharging():先使能 QC → 隔 50ms → 拉高CHG_EN,然后回读寄存器,让结果在日志里可见:[POWER] charging: P7(CHG_EN)=1 P5(QC_EN)=0 out=0x89。 - 面板上能看出用的是哪一路电。
设置 → About多了一行Power:Power USB-C (idle dimming off)或Power battery (idle dimming on)。 - 两个方向都在真机上验过。 插着线十分钟不调暗;拔掉线整条省电链回来(调暗 → 降频 → 灭屏),碰一下屏幕恢复。
- 其他没有变化。 同一套 UI 组件、同一个雨引擎、同一条时间通路、同一个配网向导。
刷机
M5Burner(无需工具链):下载下面的 matrix-rain-tab5-v1.3.5.zip → M5Burner → Custom → Import Custom FW → 选 .zip → 选 Matrix Rain Clock → Burn。
或从源码构建:
git clone https://github.com/andjiang0083/matrix-rain-tab5.git
cd matrix-rain-tab5
~/.platformio/penv/bin/pio run -e tab5
~/.platformio/penv/bin/pio run -e tab5 --target upload --upload-port /dev/cu.usbmodemXXXX⚠️ 给已经配好网的设备升级:WiFi 密码会被抹掉
合并镜像覆盖了 0x9000 的 NVS 分区,所以按 0x0 写入会清掉已保存的 WiFi 凭据,设备直接进配网向导。不是故障——重输一次密码即可,而且这次你能看清自己打的是什么。想保留凭据就只刷 app 分区(bootloader 与分区表在版本之间不变):
python3 -m esptool --chip esp32p4 -p /dev/cu.usbmodemXXXX write-flash \
0x10000 .pio/build/tab5/firmware.bin --flash-mode dio --flash-freq 80m --flash-size 16MB固件版本(报 bug 时请粘贴)
=== MATRIX RAIN v1.3.5 (Boot NTP + RTC + confirm screen + WiFi-setup) ===
随它一起的两条电源日志(开机一条、插拔线各一条),是这次能在真机上把判据定下来的原因:
[POWER] charging: P7(CHG_EN)=1 P5(QC_EN)=0 out=0x89 readOk=1
[POWER] USB-C det: pin=1 attached=1 pulled=1 | INA226 513 mA / 8380 mV
[POWER] USB-C removed (pin=0, -312 mA) — idle power save armed
附件
| 文件 | 是什么 |
|---|---|
matrix-rain-tab5-v1.3.5.bin |
DIO 合并镜像(bootloader @ 0x2000 + 分区表 + app),从 0x0 写入。 |
matrix-rain-tab5-v1.3.5.zip |
M5Burner 导入包:目录 JSON + 同一个 .bin + 首次开机说明。 |
sha256sums.txt |
两个文件的校验值。 |
两者的 bootloader / 分区表 / boot_app0 区段与 v1.3.4 逐字节相同——这是每次发布前用来确认合并偏移与 flash 模式没有漂移的检查(漂移会导致"PlatformIO 能刷、M5Burner 刷完黑屏")。
shasum -a 256:
8b2b78e5651f430261af81d97ed01b2c73c17567efdf8d6fe0be63787080bef7 matrix-rain-tab5-v1.3.5.bin
5c102ccea0ddfc48c1fbc0da6eb14fc7c30a4e29dac6dba3d4584ebaccd96e8d matrix-rain-tab5-v1.3.5.zip
仍存在的限制(未变)
- 没有 light sleep —— 闲置只降亮度、降帧率,CPU 仍在跑。
- 固定 UTC 偏移,无夏令时规则。
- 中文/非 ASCII SSID 显示为
□(ASCII 字体与键盘)。 - 音频(ES8388)与 IMU(BMI270)在本版仍未使用。 电量计(INA226)现在被用来判"插线/电池",但屏幕上仍没有电量百分比——About 那一行是唯一的读数。
许可:MIT。 The Matrix 是华纳兄弟的商标;本项目为非官方粉丝作品,不含任何电影素材。完整署名见 CREDITS.md。
v1.3.4 — the keyboard can type lower-case at all
v1.3.4 — the on-screen keyboard can type lower-case at all.
v1.3.4 —— 屏幕键盘终于能打出小写字母。

PC re-render of both states, drawn from the firmware's own geometry and font. Top: what a key types by default. Bottom: SHFT armed — one upper-case character, then it clears itself. · 两态 PC 重渲染(用固件自己的几何与字模绘制)。上:默认打出的小写;下:SHFT 点亮,一个大写字符后自动复位。
English
What was wrong
Reported in #2: "WiFi Enter Password… Can't switch to lowercase characters". The report was correct, and the bug was worse than it looked — the keyboard could not produce a lower-case character at all.
The key caps were drawn from an upper-case table, and the character appended to the password was read from that same table regardless of SHFT. SHFT only repainted its own key. So a password containing lower-case letters — that is, most passwords — could not be entered on v1.3.1, v1.3.2 or v1.3.3.
What changed
- Letter case works. Keys type lower-case by default.
SHFTis a one-shot modifier: it highlights while armed, types exactly one upper-case character, then clears itself (phone-keypad behaviour). The caps show the case they will actually type, and the123/abctoggle label follows. - One source of truth. The cap label and the character appended to the password both come from a single
keyChar(), so a key and what it types cannot disagree again — which is exactly how this survived a release. - The password field shows what you typed. It was masked in v1.3.3. On a hand-held panel the mask protected nothing, and it hid the one thing
SHFTexists to control: the case of the character just typed. - Nothing else changed. Same UI kit, same time path, same rain engine.
Flash it
M5Burner (no toolchain): download matrix-rain-tab5-v1.3.4.zip below → M5Burner → Custom → Import Custom FW → pick the .zip → select Matrix Rain Clock → Burn.
Or from source:
git clone https://github.com/andjiang0083/matrix-rain-tab5.git
cd matrix-rain-tab5
~/.platformio/penv/bin/pio run -e tab5
~/.platformio/penv/bin/pio run -e tab5 --target upload --upload-port /dev/cu.usbmodemXXXX⚠️ Upgrading an already-set-up device: the WiFi password is erased
A merged image spans the NVS partition at 0x9000, so writing one at 0x0 wipes the saved WiFi credentials and the device boots into the setup wizard. Nothing is broken — enter the password again, and this time you can read what you typed. To keep the credentials, write only the app partition (bootloader and partition table do not change between releases):
python3 -m esptool --chip esp32p4 -p /dev/cu.usbmodemXXXX write-flash \
0x10000 .pio/build/tab5/firmware.bin --flash-mode dio --flash-freq 80m --flash-size 16MBFirmware version (paste this when reporting a bug)
=== MATRIX RAIN v1.3.4 (Boot NTP + RTC + confirm screen + WiFi-setup) ===
Assets
| File | What it is |
|---|---|
matrix-rain-tab5-v1.3.4.bin |
DIO merged image (bootloader @ 0x2000 + partition table + app), written from 0x0. |
matrix-rain-tab5-v1.3.4.zip |
M5Burner import bundle: the catalogue JSON + the same .bin + first-boot notes. |
sha256sums.txt |
Checksums for both files. |
The bootloader / partition table / boot_app0 region is byte-for-byte identical to v1.3.3 — the check run before every release to confirm the merge offsets and flash mode have not drifted (drift is what causes "works from PlatformIO, black screen from M5Burner").
shasum -a 256:
cd93b9a838a8ac034fa41f680c0faadb54ae9c5f8df1e6be1ada67b2b1146aea matrix-rain-tab5-v1.3.4.bin
96f7d3caeb1cbd1a5400693d4ab4a345e51e2835d1906d9db1b4f8cf1f735674 matrix-rain-tab5-v1.3.4.zip
Still limited (unchanged)
- No light sleep — idle drops the brightness and the frame rate, but the CPU keeps running.
- Fixed UTC offsets, no daylight-saving rules.
- Chinese / non-ASCII SSIDs render as
□(ASCII font and keyboard). - Audio (ES8388), IMU (BMI270) and the fuel gauge (INA226) are unused in this build.
中文
问题是什么
#2 报的是"WiFi 密码输不进去小写"。报告是对的,而问题比表面更大——这块键盘根本打不出小写字母。
键帽取自一张全大写表,写进密码里的字符也取自同一张表,与 SHFT 无关;SHFT 只重绘了自己那颗键。所以只要密码里含小写字母(也就是绝大多数密码),在 v1.3.1 / v1.3.2 / v1.3.3 上都输不进去。
改了什么
- 大小写可用。 默认打小写;
SHFT是一次性修饰键——点亮后只输出一个大写字符,然后自动复位(手机键盘的行为)。键帽显示"实际会打出的大小写",123/abc标签同步跟随。 - 单一真源。 键帽文字与写入密码的字符都出自同一个
keyChar(),键与其输出不可能再不一致——这正是这个 bug 能活过一版发布的原因。 - 密码框显示你打的内容。 v1.3.3 里它是掩码的;在一块掌上屏幕上,掩码什么也没保护,却恰好遮住了 SHFT 唯一要控制的东西——刚打进去那个字符的大小写。
- 其余未动。 同一套 UI 元件库、同一条对时链路、同一个雨引擎。
刷机
M5Burner(无需工具链):下载下面的 matrix-rain-tab5-v1.3.4.zip → M5Burner → Custom → Import Custom FW → 选 .zip → 选 Matrix Rain Clock → Burn。
或从源码构建:
git clone https://github.com/andjiang0083/matrix-rain-tab5.git
cd matrix-rain-tab5
~/.platformio/penv/bin/pio run -e tab5
~/.platformio/penv/bin/pio run -e tab5 --target upload --upload-port /dev/cu.usbmodemXXXX⚠️ 给已经配好网的设备升级:WiFi 密码会被抹掉
合并镜像覆盖了 0x9000 的 NVS 分区,所以按 0x0 写入会清掉已保存的 WiFi 凭据,设备直接进配网向导。不是故障——重输一次密码即可,而且这次你能看清自己打的是什么。想保留凭据就只刷 app 分区(bootloader 与分区表在版本之间不变):
python3 -m esptool --chip esp32p4 -p /dev/cu.usbmodemXXXX write-flash \
0x10000 .pio/build/tab5/firmware.bin --flash-mode dio --flash-freq 80m --flash-size 16MB固件版本(报 bug 时请粘贴)
=== MATRIX RAIN v1.3.4 (Boot NTP + RTC + confirm screen + WiFi-setup) ===
附件
| 文件 | 说明 |
|---|---|
matrix-rain-tab5-v1.3.4.bin |
DIO 全镜像(bootloader @ 0x2000 + 分区表 + app),从 0x0 写入。 |
matrix-rain-tab5-v1.3.4.zip |
M5Burner 导入包:目录 JSON + 同一个 .bin + 首次开机说明。 |
sha256sums.txt |
两个文件的校验值。 |
两者的 bootloader / 分区表 / boot_app0 区段与 v1.3.3 逐字节相同——这是每次发布前用来确认合并偏移与 flash 模式没有漂移的检查(漂移会导致"PlatformIO 能刷、M5Burner 刷完黑屏")。
仍存在的限制(未变)
- 没有 light sleep —— 闲置只降亮度、降帧率,CPU 仍在跑。
- 固定 UTC 偏移,无夏令时规则。
- 中文/非 ASCII SSID 显示为
□(ASCII 字体与键盘)。 - 音频(ES8388)、IMU(BMI270)、电量计(INA226)在本版未使用。
许可:MIT。 The Matrix 是华纳兄弟的商标;本项目为非官方粉丝作品,不含任何电影素材。完整署名见 CREDITS.md。
v1.3.3 — one UI kit for every settings screen
v1.3.3 — every settings screen is now drawn from one UI kit.
v1.3.3 —— 所有设置界面改用同一套 UI 元件库。

Running on a real Tab5. · 真机实拍。
English
Changed in 1.3.3
The settings screens had grown six different ideas of what a button is: every page drew its own rectangles, and every page hit-tested them with its own hand-written numbers. That is exactly how a button drifts away from the tap meant to hit it. Everything is now drawn from src/ui_kit.h and hit-tested from the same constants.
- New UI kit — title bar, back button, card, button (5 styles), list row, key cap, timezone cell, slider. Draw code and touch code share one set of geometry constants, so a button that moves takes its hit box with it.
- The settings menu is a card stack, each card showing its current value (
Character Set KATAKANA,Brightness 50%,About v1.3.3). - Every page has a title bar and a step indicator (
1/4…4/4); sub-pages carry a back button on its own row. - One confirmation screen instead of two — the boot sync path and the WiFi wizard each carried a copy of the "Confirm Current Time" layout; both now call
confirmTimeScreen(). - WiFi list — 12 rows with 5-step signal bars and an
OPENtag,Rescan/Cancelin the action row. - Keyboard — keys are kit buttons,
Connectstays disabled until a password is typed, and the target SSID is shown as the field's placeholder. - Timezone grid — 6 columns, selected cell highlighted.
- The version string lives in one place (
APP_VERSION) for the boot banner, the About page and the settings card.
Fixed — found by a pre-flash layout check, never seen on a panel
- The back button overlapped the first row of the WiFi list, the SSID line on the keyboard page and the first row of the timezone grid; the text would have collided on screen.
- The password field rendered the WiFi password in clear text; it is masked now.
Flash it
M5Burner (no toolchain): download matrix-rain-tab5-v1.3.3.zip below → M5Burner → Custom → Import Custom FW → pick the .zip → select Matrix Rain Clock → Burn.
Or from source:
git clone https://github.com/andjiang0083/matrix-rain-tab5.git
cd matrix-rain-tab5
~/.platformio/penv/bin/pio run -e tab5
~/.platformio/penv/bin/pio run -e tab5 --target upload --upload-port /dev/cu.usbmodemXXXX⚠️ Upgrading an already-set-up device: the WiFi password is erased
A merged image spans the NVS partition at 0x9000, so writing one at 0x0 wipes the saved WiFi credentials and the device boots into the setup wizard. Nothing is broken — just enter the password again (the new on-screen keyboard is right there). If you want to keep the credentials, write only the app partition, because the bootloader and partition table do not change between releases:
python3 -m esptool --chip esp32p4 -p /dev/cu.usbmodemXXXX write-flash \
0x10000 .pio/build/tab5/firmware.bin --flash-mode dio --flash-freq 80m --flash-size 16MBFirmware version (paste this when reporting a bug)
=== MATRIX RAIN v1.3.3 (Boot NTP + RTC + confirm screen + WiFi-setup) ===
Sprite OK
Bitmap font: 91 chars loaded
[TIME] ntp=2026-10-04 11:16:57 rtc_write=ok
Ready — tap screen to cycle character sets, S=screenshot
FPS: 30
Assets
| File | What it is |
|---|---|
matrix-rain-tab5-v1.3.3.bin |
DIO merged image (bootloader @ 0x2000 + partition table + app), written from 0x0. |
matrix-rain-tab5-v1.3.3.zip |
M5Burner import bundle: the catalogue JSON + the same .bin + first-boot notes. |
sha256sums.txt |
Checksums for both files. |
The bootloader / partition table / boot_app0 region is byte-for-byte identical to v1.3.2 — that is the check used before every release to confirm the merge offsets and flash mode have not drifted (drift is what causes "works from PlatformIO, black screen from M5Burner").
Still true (unchanged)
- No light sleep — idle only dims the backlight and drops the frame rate; the CPU keeps running.
- Fixed UTC offset, no DST rules.
- Non-ASCII SSIDs render as
□(ASCII font and keyboard). - Audio (ES8388), IMU (BMI270) and the fuel gauge (INA226) are unused in this version.
- The display path is still bandwidth-limited by the SoC: the DSI scanout pulls ~110 MB/s out of PSRAM while the CPU writes the same memory. The 3-second frame-time guard stays for that reason. Note that it was not the cause of the blue screen fixed in v1.3.2 — that was a task-watchdog panic from a blocking USB-CDC write. Background: docs/PORTING-NOTES.md.
License: MIT. The Matrix is a trademark of Warner Bros.; this is an unofficial fan project containing no film assets. Full credits in CREDITS.md.
中文
1.3.3 改了什么
设置界面之前有六套"什么叫按钮"的写法:每个页面自己画矩形,每个页面再用自己手写的数字去判定点击。按钮和判定就是这么走散的。现在所有画面都由 src/ui_kit.h 绘制,判定用同一批常量。
- 新的 UI 元件库 —— 标题栏、返回键、卡片、按钮(5 种样式)、列表行、键帽、时区格、滑条。绘制与触摸共用一套几何常量:按钮挪位置,判定框跟着挪。
- 设置菜单改成卡片式,每张卡片右侧显示当前值(
Character Set KATAKANA、Brightness 50%、About v1.3.3)。 - 每个页面都有标题栏和步骤号(
1/4…4/4);子页面左上角有独立一行的返回键。 - 两个确认页合并成一个 —— 开机对时路径和配网向导各带一份"确认当前时间"的版面,现在都调
confirmTimeScreen()。 - WiFi 列表 —— 12 行、5 段信号条、
OPEN标记,Rescan/Cancel在底部操作行。 - 键盘 —— 按键用统一的按钮样式,没输密码时
Connect是灰的,目标 SSID 作为输入框占位提示。 - 时区网格 —— 6 列,选中格高亮。
- 版本号只有一个来源(
APP_VERSION):开机横幅、About 页、设置卡片共用。
修掉的问题 —— 刷机前的版面自检抓到,真机上从未出现过
- 返回键压住了 WiFi 列表第一行、键盘页的 SSID 行、时区网格第一行;刷上去会看到文字叠在一起。
- 密码框原本明文显示 WiFi 密码,现在改为
*遮罩。
刷机
M5Burner(不需要工具链):下载下面的 matrix-rain-tab5-v1.3.3.zip → M5Burner → Custom → Import Custom FW → 选该 .zip → 选中 Matrix Rain Clock → Burn。
从源码构建:
git clone https://github.com/andjiang0083/matrix-rain-tab5.git
cd matrix-rain-tab5
~/.platformio/penv/bin/pio run -e tab5
~/.platformio/penv/bin/pio run -e tab5 --target upload --upload-port /dev/cu.usbmodemXXXX先读 BUILDING_CN.md:构建固定了社区平台、Arduino 核心版本和一套预编译库包,而 src/override_toolchain.py 里有一条硬编码的工具链路径,你大概率要改它。
⚠️ 给已经配好网的设备升级:WiFi 密码会被抹掉
合并镜像覆盖了 0x9000 的 NVS 分区,所以按 0x0 写入会清掉已保存的 WiFi 凭据,设备直接进配网向导。不是故障——重输一次密码即可(新的屏幕键盘就在那儿)。想保留凭据就只刷 app 分区,因为 bootloader 和分区表在版本之间不变:
python3 -m esptool --chip esp32p4 -p /dev/cu.usbmodemXXXX write-flash \
0x10000 .pio/build/tab5/firmware.bin --flash-mode dio --flash-freq 80m --flash-size 16MB固件版本(报 bug 时请粘贴)
=== MATRIX RAIN v1.3.3 (Boot NTP + RTC + confirm screen + WiFi-setup) ===
Sprite OK
Bitmap font: 91 chars loaded
[TIME] ntp=2026-10-04 11:16:57 rtc_write=ok
Ready — tap screen to cycle character sets, S=screenshot
FPS: 30
附件
| 文件 | 说明 |
|---|---|
matrix-rain-tab5-v1.3.3.bin |
DIO 全镜像(bootloader @ 0x2000 + 分区表 + app),从 0x0 写入。 |
matrix-rain-tab5-v1.3.3.zip |
M5Burner 导入包:目录 JSON + 同一个 .bin + 首次开机说明。 |
sha256sums.txt |
两个文件的校验值。 |
两者的 bootloader / 分区表 / boot_app0 区段与 v1.3.2 逐字节相同——这正是每次发布前用来确认合并偏移与 flash 模式没有漂移的方法(漂移会导致"PlatformIO 能刷、M5Burner 刷完黑屏")。
仍存在的限制(未变)
- 没有 light sleep —— 闲置只降亮度、降帧率,CPU 仍在跑。
- 固定 UTC 偏移,无夏令时规则。
- 中文/非 ASCII SSID 显示为
□(ASCII 字体与键盘)。 - 音频(ES8388)、IMU(BMI270)、电量计(INA226)在本版未使用。
- 显示通路仍受 SoC 带宽限制:DSI 扫描从 PSRAM DMA 读取约 110 MB/s,同时 CPU 也在写同一块内存。3 秒帧超时守卫为此保留。注意它不是 v1.3.2 那个蓝屏的原因——那个是阻塞串口写导致的看门狗 panic。背景见 docs/PORTING-NOTES.md。
许可:MIT。 The Matrix 是华纳兄弟的商标;本项目为非官方粉丝作品,不含任何电影素材。完整署名见 CREDITS.md。
Matrix Rain Clock v1.3.2 — M5Stack Tab5 · 骇客帝国数字雨时钟 v1.3.2
v1.3.2 — the boot-time source of truth, and the blue screen after a sync is fixed.
v1.3.2 —— 时间来源变得可信,对时后蓝屏的问题也修掉了。

Running on a real Tab5. · 真机实拍。
English
Fixed in 1.3.2
- Blue screen + reboot right after a sync — root-caused and fixed. The device's own core dump named it: the Arduino loop task was stuck inside
cdc0_write_char()(a USB-CDC write) when the 8 s task watchdog fired. HWCDC's default TX timeout is 100 ms and onewrite()may absorb up to 20 consecutive timeouts (~2 s), so a few long lines starve the watchdog whenever a host is connected but not draining the ring — closing a serial monitor is enough. It always landed right after a sync because that is where the boot path prints its longest line.Serial.setTxTimeoutMs(0)makes every CDC write non-blocking (bytes are dropped, never waited for). Verified by clearing the flash coredump partition and re-running the exact failure scenario: it stays empty. - The clock no longer shows a stale time after a "successful" sync.
getLocalTime()was being used as the "NTP has synced" signal, but it only reports that the system clock looks plausible — andM5.begin()seeds that clock from the hardware RTC, so it returns true immediately, carrying the pre-sync value. The boot path confirmed the old time on screen and wrote it back into the RTC, which is why the clock kept showing it afterwards. The SNTP notification callback plussntp_get_sync_status()is now the signal; the clock derives HH:MM from the epoch; the RX8130CE is only a validated fallback seed. - WiFi setup can no longer trap a boot. With credentials saved, a failed network or sync still boots the clock (seeded from the RTC) instead of dropping into the setup wizard; the wizard stays reachable from
SET → WiFi Setup. - Fewer silent NTP failures.
esp_wifi_sta_get_ap_info() == ESP_OKmeans associated, not reachable, and a query sent before DHCP is silently lost. The sync now waits for a lease and re-arms once mid-window. - RTC writes are verified (read back, ±2 s), and the clock path no longer touches NVS — the timezone is cached in RAM, because flash and PSRAM share the MSPI path on this SoC.
Flash it
M5Burner (no toolchain): download matrix-rain-tab5-v1.3.2.zip below → M5Burner → Custom → Import Custom FW → pick the .zip → select Matrix Rain Clock → Burn.
Or from source:
git clone https://github.com/andjiang0083/matrix-rain-tab5.git
cd matrix-rain-tab5
~/.platformio/penv/bin/pio run -e tab5
~/.platformio/penv/bin/pio run -e tab5 --target upload --upload-port /dev/cu.usbmodemXXXXRead BUILDING.md first — the build pins a community platform, an Arduino core and a prebuilt library bundle, and src/override_toolchain.py contains a hard-coded toolchain path you will probably have to edit.
Identify your build (please quote this in bug reports)
=== MATRIX RAIN v1.3.2 (Boot NTP + RTC + confirm screen + WiFi-setup) ===
Sprite OK
[TIME] ntp=2026-10-04 01:15:33 utc=17:15 rtc=on write=ok
Ready — tap screen to cycle character sets, S=screenshot
FPS: 30
The [TIME] line is new: it reports the NTP result, the UTC hour, whether the RTC is enabled, and whether the RTC write landed.
Assets
| File | What it is |
|---|---|
matrix-rain-tab5-v1.3.2.bin |
Merged flash image (bootloader @ 0x2000 + partitions + app, DIO), write from offset 0x0. |
matrix-rain-tab5-v1.3.2.zip |
M5Burner bundle: catalogue JSON + the same .bin + first-boot notes. |
sha256sums.txt |
Checksums for both. |
Both were built from this tag's tree. The bootloader / partition table / boot_app0 region is byte-identical to v1.3.1, which is how the release verifies that the merge offsets and flash mode have not drifted (that drift is what makes a merged image boot under PlatformIO but not under M5Burner).
Still true (unchanged limitations)
- No light sleep — idle only dims and drops the frame rate; the CPU keeps running.
- Fixed UTC offset, no DST rules.
- Chinese / non-ASCII SSIDs render as
□(ASCII font and keyboard). - Audio (ES8388), IMU (BMI270) and the battery gauge (INA226) are not used in this build.
- The display path is still bandwidth-limited by the SoC: DSI scan-out DMA-reads ~110 MB/s from PSRAM while the CPU writes the same memory. The 3 s frame-timeout guard stays for that separate case. Note that this is not what caused the blue screen fixed above — that one was a watchdog panic from a blocking serial write. Background: docs/PORTING-NOTES.md.
Licence: MIT. The Matrix is a trademark of Warner Bros.; this is an unaffiliated fan project with no film assets. See CREDITS.md for full attribution, including the terms attached to the generated katakana bitmap font.
中文
1.3.2 修了什么
- 对时成功后蓝屏重启 —— 已定位根因并修复。 设备自己的 coredump 直接点名了它:Arduino 的 loop 任务卡在
cdc0_write_char()(USB-CDC 写出)里,直到 8 秒的任务看门狗触发。HWCDC的默认发送超时是 100 ms,而一次write()最多可累计 20 次超时(约 2 秒)——所以主机"连着但不读"时(关掉串口监控就够了),几句长打印就能饿死看门狗。它总发生在对时刚完成之后,因为开机路径上最长的那行打印就在那一刻。现在Serial.setTxTimeoutMs(0)让所有 CDC 写出不再等待(缓冲满则丢字节)。验证方式:擦净 flash 的 coredump 分区后重跑同样的失败场景,分区保持全空。 - 对时"成功"后时钟不再显示旧时间。 旧代码把
getLocalTime()当作"已对时"信号,但它只表示系统时钟"看起来合理"——而M5.begin()会用硬件 RTC 播种系统时钟,所以它在configTime()之后立刻返回 true,带的却是同步前的值。开机路径因此把旧时间确认到屏幕上并写回 RTC,这就是"对时后对、进主界面又错"的原因。现在以 SNTP 回调 +sntp_get_sync_status()为准;时钟从 epoch 直接算 HH:MM;RX8130CE 只在无网时作为经过校验的兜底种子。 - 配网向导不会再劫持开机。 已存凭据时,联网或对时失败也照常进时钟(用 RTC 兜底),不再掉进配网向导;向导留在
SET → WiFi Settings手动重进。 - 减少静默对时失败。
esp_wifi_sta_get_ap_info()==ESP_OK只代表"已关联",不等于拿到 DHCP,此时发出的 SNTP 第一查询会因无 DNS 被丢弃。现在先等拿到 IP,并在窗口过半时重发一次。 - RTC 写入改为读回校验(±2 秒),并让时钟路径完全不碰 NVS(时区缓存进 RAM)——这片 SoC 上 flash 与 PSRAM 共用 MSPI 通路。
刷机
M5Burner(不需要工具链):下载下面的 matrix-rain-tab5-v1.3.2.zip → M5Burner → Custom → Import Custom FW → 选该 .zip → 选中 Matrix Rain Clock → Burn。
从源码构建:
git clone https://github.com/andjiang0083/matrix-rain-tab5.git
cd matrix-rain-tab5
~/.platformio/penv/bin/pio run -e tab5
~/.platformio/penv/bin/pio run -e tab5 --target upload --upload-port /dev/cu.usbmodemXXXX先读 BUILDING_CN.md:构建固定了社区平台、Arduino 核心版本和一套预编译库包,而 src/override_toolchain.py 里有一条硬编码的工具链路径,你大概率要改它。
固件版本(报 bug 时请粘贴)
=== MATRIX RAIN v1.3.2 (Boot NTP + RTC + confirm screen + WiFi-setup) ===
Sprite OK
[TIME] ntp=2026-10-04 01:15:33 utc=17:15 rtc=on write=ok
Ready — tap screen to cycle character sets, S=screenshot
FPS: 30
[TIME] 这行是新增的:一次开机就能看出时间从哪来、RTC 写没写进去。
附件
| 文件 | 说明 |
|---|---|
matrix-rain-tab5-v1.3.2.bin |
DIO 全镜像(bootloader @ 0x2000 + 分区表 + app),从 0x0 写入。 |
matrix-rain-tab5-v1.3.2.zip |
M5Burner 导入包:目录 JSON + 同一个 .bin + 首次开机说明。 |
sha256sums.txt |
两个文件的校验值。 |
两者的 bootloader / 分区表 / boot_app0 区段与 v1.3.1 逐字节相同——这正是发布时用来确认合并偏移与 flash 模式没有漂移的方法(漂移会导致"PlatformIO 能刷、M5Burner 刷完黑屏")。
仍存在的限制(未变)
- 没有 light sleep —— 闲置只降亮度、降帧率,CPU 仍在跑。
- 固定 UTC 偏移,无夏令时规则。
- 中文/非 ASCII SSID 显示为
□(ASCII 字体与键盘)。 - 音频(ES8388)、IMU(BMI270)、电量计(INA226)在本版未使用。
- 显示通路仍受 SoC 带宽限制:DSI 扫描从 PSRAM DMA 读取约 110 MB/s,同时 CPU 也在写同一块内存。3 秒帧超时守卫为此保留。注意它不是上面那个蓝屏的原因——那个是阻塞串口写导致的看门狗 panic。背景见 docs/PORTING-NOTES.md。
许可:MIT。 The Matrix 是华纳兄弟的商标;本项目为非官方粉丝作品,不含任何电影素材。完整署名见 CREDITS.md。
Matrix Rain Clock v1.3.1 — M5Stack Tab5 · 骇客帝国数字雨时钟 v1.3.1
Digital rain on the 1280×720 MIPI-DSI panel of the M5Stack Tab5 — first public release.
M5Stack Tab5(ESP32-P4)1280×720 MIPI-DSI 屏上的数字雨 —— 首个公开版本。
Running on a real Tab5: 80 columns of glyph rain, and the clock emerging from the characters that pass through it. · 真机实拍:80 列字符雨,时钟从穿过它的字符里显出来。
English
What it does
- 80-column rain engine — 16 px cells, trails up to 18 glyphs, per-column depth (0.6–1.5×) driving both fall speed and trail length, 30 fps.
- Six character sets —
FULL,NUM,HEX,BIN,ALPHA,KATAKANA(91 bitmap glyphs, 16×16 1 bpp, no CJK font engine). Tap the screen to cycle. - 7-segment ghost-glow clock — glyphs are pushed inwards and re-tinted where they cross a lit segment (the rain visibly refracts around the digits) and stay behind as ghosts fading over ~8.5 s.
- Touch WiFi wizard — scan → SSID list → on-screen keyboard → UTC offset → connect → saved to NVS.
- Time — blocking NTP sync at boot (
pool.ntp.org,time.google.com) with a confirmation screen showing live seconds, UTC written to the RX8130CE hardware RTC, re-read every 60 s. No network needed after the first boot. - Setup menu (
SETin the bottom-right corner) — WiFi, character set, brightness (12-bit LEDC PWM on GPIO22, saved to NVS), About. - Idle — 2 min → 25 % brightness, 3 min → 8 fps, 10 min → backlight off.
- Serial screenshot — press
Sin a 115200 serial session: one frame is re-rendered into a PSRAM sprite and streamed as a BMP.
Flash it
M5Burner (no toolchain): download matrix-rain-tab5-v1.3.1.zip below → M5Burner → Custom → Import Custom FW → pick the .zip → select Matrix Rain Clock → Burn.
From source:
git clone https://github.com/andjiang0083/matrix-rain-tab5.git
cd matrix-rain-tab5
~/.platformio/penv/bin/pio run -e tab5
~/.platformio/penv/bin/pio run -e tab5 --target upload --upload-port /dev/cu.usbmodemXXXXRead BUILDING.md first — the build pins a community platform, an Arduino core and a prebuilt library bundle, and src/override_toolchain.py contains a hard-coded toolchain path you will probably have to edit.
Identify your build (please quote these in bug reports)
=== MATRIX RAIN v1.3.1 (Boot NTP + RTC + confirm screen + WiFi-setup) ===
Sprite OK
Bitmap font: 91 chars loaded
Ready — tap screen to cycle character sets, S=screenshot
FPS: 30
Assets
| File | What it is |
|---|---|
matrix-rain-tab5-v1.3.1.bin |
Merged flash image (bootloader @ 0x2000 + partitions + app, DIO), write from offset 0x0. sha256: d1276a6f323789ce97355d7e7d4b4c1f9e40336d5c65e88ae4c731f8f6bc93ff |
matrix-rain-tab5-v1.3.1.zip |
M5Burner bundle: catalogue JSON + the same .bin + first-boot notes. sha256: d64d6163231ac6dacddbf77f6a5ed0a19c49c5449545444eda7c67e05123b483 |
Both were built from this repository's tree (Flash 35.8 %, RAM 10.4 %, 1,244,704 bytes).
Known limitations (honest list)
- No light sleep — idle only dims and drops the frame rate; the CPU keeps running.
- Fixed UTC offset, no DST rules.
- Chinese / non-ASCII SSIDs render as
□(ASCII font and keyboard). - Audio (ES8388), IMU (BMI270) and battery gauge (INA226) are not used in this build.
- The display path is bandwidth-limited by the SoC: DSI scan-out DMA-reads ~110 MB/s from PSRAM while the CPU writes the same memory, and an attached USB-CDC session adds a third consumer — that combination has stalled the panel on this board. The firmware ships a 3 s frame-timeout guard that reboots rather than staying wedged. Background: docs/PORTING-NOTES.md.
- First boot genuinely needs a 2.4 GHz access point for NTP; there is no manual time-set UI yet.
Feedback
Issues and discussions are welcome — especially measured reports about the display path, and anything that uses the hardware this build ignores. See ROADMAP.md.
Licence: MIT. The Matrix is a trademark of Warner Bros.; this is an unaffiliated fan project with no film assets. See CREDITS.md for full attribution, including the terms attached to the generated katakana bitmap font.
中文
它做了什么
- 80 列数字雨引擎 —— 16px 网格,拖尾最长 18 个字符,每列独立纵深(0.6–1.5×)同时决定下落速度与拖尾长度,30fps。
- 6 种字符集 ——
FULL、NUM、HEX、BIN、ALPHA、KATAKANA(91 个位图字形,16×16 1bpp,不链任何 CJK 字体引擎)。点屏幕切换。 - 7 段式"幽灵发光"时钟 —— 与点亮的段相交的字符会被向内推移并重新调色(雨明显是绕着数字弯过去的),随后作为残影留下,约 8.5 秒淡尽。
- 全触控 WiFi 配网向导 —— 扫描 → 网络列表 → 屏幕键盘 → UTC 偏移 → 连接 → 存入 NVS。
- 时间 —— 开机阻塞式 NTP 对时(
pool.ntp.org、time.google.com),带实时秒数的确认界面;UTC 写入 RX8130CE 硬件 RTC,之后每 60 秒读一次。首次开机后不再需要网络。 - 设置菜单(右下角
SET)—— WiFi、字符集、亮度(GPIO22 12 位 LEDC PWM,存 NVS)、关于。 - 闲置 —— 2 分钟→25% 亮度,3 分钟→8fps,10 分钟→关背光。
- 串口截图 —— 115200 串口里按
S:把一帧重新渲染进 PSRAM 的 sprite,以 BMP 流式发出。
刷机
M5Burner(不需要工具链):下载下面的 matrix-rain-tab5-v1.3.1.zip → M5Burner → Custom → Import Custom FW → 选该 .zip → 选中 Matrix Rain Clock → Burn。
从源码构建:
git clone https://github.com/andjiang0083/matrix-rain-tab5.git
cd matrix-rain-tab5
~/.platformio/penv/bin/pio run -e tab5
~/.platformio/penv/bin/pio run -e tab5 --target upload --upload-port /dev/cu.usbmodemXXXX先读 BUILDING_CN.md:构建固定了社区平台、Arduino 核心版本和一套预编译库包,而 src/override_toolchain.py 里有一条硬编码的工具链路径,你大概率要改它。
固件版本(报 bug 时请粘贴)
=== MATRIX RAIN v1.3.1 (Boot NTP + RTC + confirm screen + WiFi-setup) ===
Sprite OK
Bitmap font: 91 chars loaded
Ready — tap screen to cycle character sets, S=screenshot
FPS: 30
附件
| 文件 | 说明 |
|---|---|
matrix-rain-tab5-v1.3.1.bin |
合并烧录镜像(bootloader @ 0x2000 + 分区表 + 应用,DIO),从 0x0 开始写入。sha256: d1276a6f323789ce97355d7e7d4b4c1f9e40336d5c65e88ae4c731f8f6bc93ff |
matrix-rain-tab5-v1.3.1.zip |
M5Burner 打包:目录 JSON + 同一个 .bin + 首启说明。sha256: d64d6163231ac6dacddbf77f6a5ed0a19c49c5449545444eda7c67e05123b483 |
两个文件都由本仓库的代码树构建(Flash 35.8%、RAM 10.4%、1,244,704 字节)。
已知限制(诚实清单)
- 没有 Light Sleep —— 闲置只是调暗、降帧率,CPU 一直跑着。
- 时区是固定 UTC 偏移,不含夏令时规则。
- 中文/非 ASCII 的 SSID 显示为
□(字体和键盘都是 ASCII)。 - 音频(ES8388)、IMU(BMI270)、电量计(INA226)本版本均未使用。
- 显示通路受 SoC 带宽限制:DSI 扫屏以约 110MB/s 从 PSRAM DMA 读取,而 CPU 在写同一片内存,再挂上 USB-CDC 就是第三个消费者——这个组合在这块板子上把面板卡死过。固件带 3 秒帧超时保护,超时会重启而不是僵住。完整分析见 docs/PORTING-NOTES.md。
- 首次开机确实需要一个 2.4GHz 热点完成 NTP 对时;目前还没有手动对时界面。
反馈
欢迎开 issue 与 discussion —— 特别是带实测数据的显示通路报告,以及任何把本版本没用的硬件用起来的尝试。见 ROADMAP_CN.md。
许可:MIT。《骇客帝国》是华纳兄弟的商标,本项目为无关联同人作品、不含任何电影素材。完整署名见 CREDITS.md(含生成的片假名位图字库所附带的条款)。