You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ESP32-S3: SPI/UART/LCD_CLOCKLESS/LCD_SPI loopback captures fail to arm (wait=-1) while RMT passes 4/4 (#3576 Phase 9 audit) #3591
Found during the #3576 Phase 9 per-board driver audit (S3 on COM22, loopback jumper GPIO1→GPIO2 — RMT passing 4/4 byte-exact proves the jumper and the capture pipeline work for the RMT driver).
S3 matrix (runSingleTest, 10 LEDs, ALL_ONES)
Driver
Result
Detail
RMT
✅ 4/4 byte-exact
SPI
❌ 0/4
captureWaitResult:-1 — RX begin() failed, capture never armed
UART
❌ 0/4
captureWaitResult:-1
LCD_CLOCKLESS
❌ 0/4
captureWaitResult:-1
LCD_SPI
❌ 0/4
captureWaitResult:-1
Analysis
wait=-1 = the harness's capture begin() returned false before arming (a different failure family from C6/P4 PARLIO in #3586, where the RX arms but records nothing). The pattern is exactly "every non-RMT driver": the capture path for non-RMT drivers sets rx_config.use_dma = !is_rmt_driver = true, and S3 is the only bench chip with RMT RX DMA silicon — prime suspect is the RMT-RX DMA begin path on S3 (channel/DMA alloc failure or config rejection). The boot-time GPIO-toggle RX self-test (use_dma=false) passes on the same pin.
With setDebug on, no FL_WARN surfaces from the begin failure — the failing path is silent (worth adding a warn).
Next steps: force use_dma=false for one S3 run to confirm; then fix the S3 RMT-RX DMA begin (or its silent-failure reporting) in rmt_rx_channel_5.cpp.hpp.
Root-caused and fixed in PR #3592 (merged): the S3 RMT-RX DMA-mode begin() fails silently; begin() now retries once in non-DMA mode. Bench: UART/LCD_CLOCKLESS/LCD_SPI all went 0/4 → 4/4 byte-exact on the GPIO1→2 loopback; cross-board regression green (WROOM 5 drivers, C6 SPI/UART, P4 RMT/SPI/UART). Two follow-ups remain open: (1) find WHY the S3 DMA arm path fails (the fallback masks it — the silent failure point still needs a warn + fix so long captures can use DMA again on S3); (2) S3 SPI now arms but captures 0 edges — same transmit-not-captured family as C6/P4 PARLIO, tracked in #3586. Keeping this open for (1).
Root-caused and resolved (PR #3600). On-target telemetry (new RmtRxDebug::dma_tally, read via peekMem since logs are suppressed during captures) gave the definitive verdict on ESP32-S3:
So the "silent DMA arm failure" was NOT a driver bug and NOT DMA-slot contention (fellback=0 — the shared TX/RX slot was granted every time). It was heap_caps_malloc(MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL) failing 100% of the time (dma_fail_where=1): the 14336-symbol descriptor pool plus its matching user buffer needs ~112 KB of contiguous DMA-internal RAM, which is unavailable once WiFi is up. begin() then transparently retried non-DMA and every capture passed — a silent-but-correct memory-pressure fallback.
Also fixed a latent size mismatch found along the way: the DMA user buffer was sized 14000 while the pool was 14336; if it had ever allocated, the DMA engine would have overrun it (bench-confirmed StoreProhibited/Cache-error when the buffer is shrunk below the pool). Both now derive from one kDmaRxSymbols constant.
The non-DMA ping-pong path (en_partial_rx) captures every S3 driver's frames reliably (UART/LCD_CLOCKLESS/LCD_SPI/RMT 4/4), so DMA — which only offers CPU offload for this capture use — is intentionally left to fall back on S3 rather than forced with a fragile small pool. The fallback is now observable rather than silent.
Activity
fix(rmt_rx): retry begin() without DMA when the DMA arm path fails (#…
zackees commentedon Jul 2, 2026
Root-caused and fixed in PR #3592 (merged): the S3 RMT-RX DMA-mode begin() fails silently;
begin()now retries once in non-DMA mode. Bench: UART/LCD_CLOCKLESS/LCD_SPI all went 0/4 → 4/4 byte-exact on the GPIO1→2 loopback; cross-board regression green (WROOM 5 drivers, C6 SPI/UART, P4 RMT/SPI/UART). Two follow-ups remain open: (1) find WHY the S3 DMA arm path fails (the fallback masks it — the silent failure point still needs a warn + fix so long captures can use DMA again on S3); (2) S3 SPI now arms but captures 0 edges — same transmit-not-captured family as C6/P4 PARLIO, tracked in #3586. Keeping this open for (1).refactor(rmt_rx): consolidate bench telemetry into a lazy singleton +…
zackees commentedon Jul 5, 2026
Root-caused and resolved (PR #3600). On-target telemetry (new
RmtRxDebug::dma_tally, read via peekMem since logs are suppressed during captures) gave the definitive verdict on ESP32-S3:dma_tally = [requested=16, armedOK=0, fellback=0, armFail=16]So the "silent DMA arm failure" was NOT a driver bug and NOT DMA-slot contention (fellback=0 — the shared TX/RX slot was granted every time). It was
heap_caps_malloc(MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL)failing 100% of the time (dma_fail_where=1): the 14336-symbol descriptor pool plus its matching user buffer needs ~112 KB of contiguous DMA-internal RAM, which is unavailable once WiFi is up.begin()then transparently retried non-DMA and every capture passed — a silent-but-correct memory-pressure fallback.Also fixed a latent size mismatch found along the way: the DMA user buffer was sized 14000 while the pool was 14336; if it had ever allocated, the DMA engine would have overrun it (bench-confirmed StoreProhibited/Cache-error when the buffer is shrunk below the pool). Both now derive from one
kDmaRxSymbolsconstant.The non-DMA ping-pong path (
en_partial_rx) captures every S3 driver's frames reliably (UART/LCD_CLOCKLESS/LCD_SPI/RMT 4/4), so DMA — which only offers CPU offload for this capture use — is intentionally left to fall back on S3 rather than forced with a fragile small pool. The fallback is now observable rather than silent.