Skip to content

LCD-7: a 64 KB data cache as well - #20

Merged
bdbarnett merged 1 commit into
mainfrom
lcd7-dcache64
Sep 25, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
lcd7-dcache64

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

Follow-up to #17. Adds CONFIG_ESP32S3_DATA_CACHE_64KB=y to the Waveshare ESP32-S3-Touch-LCD-7's sdkconfig.lcd7.

#17 left this out because it cuts internal RAM to ~13 KB free. It has now been soaked under real load. Measured while the board both runs an LVGL remote-control UI and decodes and streams audio to a USB sound card on its native port:

#17 (32 KB D-cache) + 64 KB D-cache
full-screen redraw 205 ms 147 ms
panel switch 88 ms 59 ms
30 list rows: build 780 ms 399 ms
30 list rows: layout 608 ms 335 ms
30 list rows: first draw 245 ms 184 ms
internal RAM free 54 KB 23 KB

The same LVGL layout runs about 216× faster on a desktop, so this board is memory-bound (LVGL's objects live in PSRAM), and the data cache is the main lever left.

Soak: 30 minutes of real use: about 25 track skips and picks, Wi-Fi streaming, the USB host running. The minimum internal RAM free was 17 KB. There were no allocation failures, no Wi-Fi drops and no audio stalls. The earlier out-of-memory failure (24 bytes of DMA RAM free) came from every malloc under 8 KB going to internal RAM; the fragment's SPIRAM_MALLOC_ALWAYSINTERNAL=512 already fixes that.

The fragment's header comment also stops naming the specific applications it was measured with; it describes them instead.

On top of #17's 64-byte lines and 32 KB instruction cache. Measured with
the board decoding and streaming audio while the LVGL UI runs: full redraw
205 -> 147 ms, panel switch 88 -> 59 ms, 30 list rows built 780 -> 399 ms
and laid out 608 -> 335 ms. The same layout is ~216x faster on a desktop:
the board is memory-bound and the data cache is the lever. Internal RAM
free goes 54 -> 23 KB; a 30-minute soak of real use (about 25 track skips
and picks, Wi-Fi streaming, the USB host running) kept a minimum of 17 KB
with no allocation failures, Wi-Fi drops or audio stalls.

The fragment's header no longer names the applications it was measured
with; it describes them.
@bdbarnett
bdbarnett merged commit 1be0895 into main Sep 25, 2026
@bdbarnett
bdbarnett deleted the lcd7-dcache64 branch September 25, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant