44 lines
3.8 KiB
Markdown
44 lines
3.8 KiB
Markdown
---
|
||
type: source
|
||
tags: [display, performance, psram, xip, ota, flicker, verified]
|
||
updated: 2026-09-27
|
||
---
|
||
|
||
# OTA under XIP-from-PSRAM: the panel keeps every frame (2026-09-27, 17:46)
|
||
|
||
Raw: `raw/perf-xip-ota-20260927-174617.log` — scripted session on COM14 (attach without reset, `perf on 1`, `wifi status`, `ota install force`, log until the reboot). Firmware: branch `display-xip` `dev` build = v0.1.6 + perf monitor + **core rebuilt with `CONFIG_SPIRAM_XIP_FROM_PSRAM=y` (`FETCH_INSTRUCTIONS`, `RODATA`) and `CONFIG_LCD_RGB_ISR_IRAM_SAFE=y`** via pioarduino `custom_sdkconfig`. Bench, USB, Wi-Fi joined (RSSI −53 dBm, channel 1). Same test as in [[perf-dots-and-ota-2026-09-27]] an hour earlier on the stock core.
|
||
|
||
## Result `(verified)`
|
||
|
||
| `ota install force`, v0.1.6, 1.71 MB | stock core (16:59) | XIP core (17:46) |
|
||
|---|---|---|
|
||
| panel refreshes per second during the download | **4–8** | **24–25** |
|
||
| longest gap between refreshes | **290–747 ms** | **41.5–41.7 ms** (one frame) |
|
||
| download time | ~36 s | ~33 s |
|
||
| core 1 idle during download | 23–31 % | 25–38 % |
|
||
| core 0 idle during download | 33–44 % | 89–93 % |
|
||
| internal free during download | 59.4 KB | 55.8 KB |
|
||
| PSRAM free (idle, before) | 6.60 MB | **4.89 MB** (code + rodata now resident in PSRAM, ~1.7 MB) |
|
||
|
||
Not one dropped frame in 33 s of continuous flash writes. The mechanism in the earlier page — cache disabled for every sector write → framebuffer refill starves → restart at vsync — no longer applies: with the code executing from PSRAM the flash operation does not take the PSRAM away, and with the refill interrupt in IRAM it keeps running while flash is busy. **The screen can stay on during an update; a progress bar is now possible** (step 4).
|
||
|
||
Also seen:
|
||
- Boot / first full redraw under XIP: 614 kpx in 142 ms (stock: ~148 ms) — no measurable render slow-down from executing code out of PSRAM in this one sample; screen-change frames should be compared over a real session.
|
||
- Idle Driveline under XIP: 0 fps, LVGL idle 99–100 %, cores 95–96 % idle, 24 vsync/s, gap 41.5 ms — same as the stock core after step 1b.
|
||
- Internal free at idle 63.3 KB (stock 66.3 KB); largest block unchanged at 31.7 KB.
|
||
- Cost: `custom_sdkconfig` rebuilds the Arduino core: first build 20 min (and it failed on RainMaker/Insights embedding `https_server.crt` until those unused components were dropped with `custom_component_remove`), rebuilds ~3 min, normal incremental builds unchanged. Generated `sdkconfig.defaults`, `sdkconfig.<env>`, `managed_components/`, `.dummy/` are git-ignored. CI must be able to do the same rebuild (open).
|
||
|
||
## Second run, with the progress bar (17:55, `raw/perf-xip-ota-20260927-175522.log`)
|
||
|
||
Same forced install with the new on-screen notice (bar updated per percent from the download loop, screen lit). Panel: **24–25 frames/s, 41.5–41.8 ms gap throughout**; LVGL rendered 2–3 small frames/s (~28 kpx, the bar) at 10–12 ms each; core 1 idle 29–38 %. User watching the screen: "the progress bar appeared and no flickering or other issues" `(verified)`.
|
||
|
||
## Still to verify (needs eyes)
|
||
|
||
- **Dots**: idle screen with Wi-Fi associated, several minutes, on the XIP build. The vsync counter cannot see them; only the user can. If the refill ISR being IRAM-safe and the flash traffic being gone were the cause, they are gone; if PSRAM bandwidth contention alone can still delay a refill, some may remain → fallbacks on [[open-questions]] #13 (lower pixel clock, larger bounce buffers, Wi-Fi/LWIP buffers to internal RAM).
|
||
- **Swipe lag**: screen-change frame times on the XIP build vs the 140–330 ms measured on stock.
|
||
- **Gauge Tuning save flicker**: no frame was lost on stock either; expect none.
|
||
|
||
## Related
|
||
|
||
[[perf-dots-and-ota-2026-09-27]] · [[perf-baseline-2026-09-27]] · [[open-questions]] · [[ota-updates]] · [[esp32-s3-touch-lcd-5b]]
|