Skip to content

LCD-7: 14 MHz pixel clock and 10-row bounce buffers, so Wi-Fi and USB survive the panel - #96

Merged
bdbarnett merged 2 commits into
mainfrom
lcd7-bounce-rows
Sep 25, 2026
Merged

bdbarnett merged 2 commits into
mainfrom
lcd7-bounce-rows

Conversation

@bdbarnett

@bdbarnett bdbarnett commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Two board-config changes for the Waveshare ESP32-S3-Touch-LCD-7, found while making it stream Spotify into a P4 USB sound card while running a Spotify remote UI:

14 MHz pixel clock (was 16). At 16 MHz the RGB scanout wrecked the board's own Wi-Fi at the same -77 dBm: 10-33 % ping loss with the panel running, 0 % with scanout stopped, and TLS downloads that stalled until the server reset them. At 14 MHz: 1.7 % loss and five of five 500 KB downloads at 176-237 KB/s (12 MHz was similar). Refresh drops to ~34 Hz; the image has not been checked by eye for flicker yet.

bounce_rows=10. At displayif's default 20 rows the panel takes 64 KB of internal DMA RAM. With Wi-Fi, TLS and a USB host up, the DMA-capable region sat at 24 bytes free and Wi-Fi fell over. 10 rows (32 KB) keeps ~60 KB free. This needs PyDevices/displayif#42; older displayif builds hit the TypeError fallback and keep their default.

Independent of #77 (EXIO5, same file, different lines).

…and USB

At displayif's default 20 rows the panel takes 64 KB of internal DMA RAM. On
this board with Wi-Fi, TLS and a USB audio host up (spotapi's remote and an
earful speaker playing into a P4 sound card), the DMA-capable region sat at
24 bytes free; esp-aes then failed to allocate and Wi-Fi dropped. 10 rows
(32 KB) keeps ~65 KB free under the same load. Needs displayif's bounce_rows
(PyDevices/displayif, branch dcfb-bounce-rows); older builds ignore it via
the TypeError fallback.
At 16 MHz the RGB scanout's PSRAM traffic (or its emissions; the effect is
the same) wrecked the board's own Wi-Fi: 10-33 % ping loss with the panel
running and 0 % with it stopped, at the same -77 dBm, and TLS downloads that
stalled until the server reset the connection. At 14 MHz: 1.7 % loss and
five of five 500 KB downloads at 176-237 KB/s (12 MHz: 250-306 KB/s, 29 Hz).
14 MHz keeps the refresh at ~34 Hz.
@bdbarnett
bdbarnett merged commit 6ed8951 into main Sep 25, 2026
2 checks passed
@bdbarnett
bdbarnett deleted the lcd7-bounce-rows branch September 25, 2026 11:52
bdbarnett added a commit to PyDevices/micropython-pydevices that referenced this pull request Sep 25, 2026
…g.lcd7) (#15)

The 4.3" board's sdkconfig.board and partition table (same chip, memory and
flash layout; boards flashed as the 4.3 keep their filesystem), then this
board's fragment, appended last so it wins:

- SPIRAM_MALLOC_ALWAYSINTERNAL 8192 -> 512, fewer Wi-Fi RX buffers, a 16 KB
  TCP window: internal DMA RAM, which the RGB panel's bounce buffers, the
  Wi-Fi driver, hardware AES and the USB host all need, sat at 24 bytes free
  with the shared settings, then esp-aes failed and Wi-Fi dropped.
- FREERTOS_HZ 100 -> 1000: sleep_ms() under a tick busy-waits with the GIL
  held, keeping the UI thread 54 % busy while idle.

Measured 2026-09-25 with spotapi's remote on the panel and earful streaming
into a USB sound card (earful docs/lcd-7.md). Built from this directory the
sdkconfig is identical to the image those measurements ran on. The board's
board_config.py side is PyDevices/pydevices#96 (bounce_rows=10, 14 MHz).
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