Repository navigation
feat(autoresearch): passive edge-probe mode + pre-filter RX telemetry (#3586) - #3596
Conversation
…#3586) - edgeProbe gains {passive:true}: no pinMode/attachInterrupt/pull toggles — only the triggered tight-loop sampler task. Safe on pads owned by an armed receiver (active mode destroyed the RX arm and produced self-inflicted artifacts). - rmt_rx: g_rmtrx_cb_raw_symbols / g_rmtrx_cb_first_raw capture the PRE-FILTER symbol count and first raw symbol per callback. Findings (recorded on #3586): pin 0 — the receiver's own pad — carries the FULL crisp PARLIO waveform (passive probe: H~893/L~356 ns alternation through the jumper), yet the RMT hardware's raw callback delivers exactly ONE symbol spanning the whole frame as continuous HIGH (H 731 us). Probe presence does not alter pass/fail. Every digital register (input mux, filter, divider, idle threshold) is byte-identical to captures that work. The remaining investigation needs an oscilloscope or ESP-IDF/vendor-level review of RMT RX input sampling during concurrent PARLIO/RMT-TX activity. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds a new ChangesEdge Probe Passive Mode
RMT RX Telemetry
Estimated code review effort: 2 (Simple) | ~12 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…3588) (#3597) Route handlers used to execute ON the esp_http_server FreeRTOS task, running full fl::json/string/Response machinery concurrently with the main loop's fl:: churn. Requests are now marshaled: the httpd task extracts plain-C request data (method/uri/body buffers only), queues it, and blocks on a semaphore; the main task — via the existing task::Executor pump — runs the fl:: handler and hands back a heap-allocated Response the httpd task then serializes with IDF C APIs. No fl:: object is constructed or mutated off the main task. When the main loop is busy (e.g. a long bench test), requests get a clean 5xx instead of cross-task execution. Verified over the air (WROOM AP + C6 client): GET /ping 200 through the marshaled path. The #3588 corruption itself STILL reproduces even with handlers fully marshaled — which eliminates the last fl-object-cross-task theory; per-task stack watermarks (new heapCheck "tasks" field) show every task healthy under traffic, the RX ISR does no allocation, and heap integrity is intact seconds before the crash. Full record on the issue; next step is an IDF-source build with comprehensive heap poisoning. Also: - HOTFIX: #3596's pre-filter ISR telemetry broke the classic-ESP32 link ("l32r: literal placed after use" in the IRAM rxDoneCallback); the telemetry writes are now RISC-V-only. - heapCheck RPC reports per-task stack high-water marks. Host: 347/347, lint clean; esp32dev/c6/s3 compile clean. Co-authored-by: Claude Fable 5 <[email protected]>
… root-cause S3 DMA fallback (#3591) (#3600) Telemetry - The scattered `g_rmtrx_*` volatile globals (wait/max/first-symbols, callback raw-symbol probes) reserved BSS unconditionally. They are now fields of one `RmtRxDebug` struct reached via `fl::Singleton<RmtRxDebug>` — lazily constructed on first RX-channel creation, so nothing is reserved unless a capture actually runs. - The ISR reaches the struct through a cached member pointer (mDebug) instead of a global symbol. A member deref emits no absolute-address literal, so the telemetry is now IRAM-safe on Xtensa too — this removes the `#if defined(__riscv)` gate that #3596 had to add after the "l32r: literal placed after use" link failure. Telemetry now works on every ESP32 variant. #3591 — S3 RMT-RX DMA "silent arm failure" root-caused - New begin()/arm telemetry (begin_dbg + accumulating dma_tally + dma_fail_where) let the bench read the DMA outcome despite suppressed logs. Verdict on ESP32-S3: dma_tally = [requested=16, armedOK=0, fellback=0, armFail=16] — the shared DMA slot IS granted (no TX contention), but the arm fails 100% at heap_caps_malloc (dma_fail_where=1). The 14336-symbol pool + a matching user buffer needs ~112 KB of contiguous DMA-internal RAM, unavailable once WiFi is up. begin() then retries non-DMA and every capture passes — the failure was purely a silent, correct memory-pressure fallback. - Fixed a latent size MISMATCH exposed while investigating: the DMA user buffer was sized 14000 while the descriptor pool was 14336. If that buffer ever allocated, the DMA engine would write past it (bench confirmed: StoreProhibited/Cache-error crash when the buffer is shrunk below the pool). The user buffer is now derived from the same kDmaRxSymbols constant as the pool, so they can never diverge. The non-DMA ping-pong path (en_partial_rx) captures every S3 driver's frames reliably; DMA offers only CPU offload here, so enabling it on S3 is deferred rather than forced with a fragile small pool. Verified: WROOM RMT/I2S/UART 4/4, C6 SPI/UART 4/4, S3 UART/LCD_CLOCKLESS/LCD_SPI/RMT 4/4 (single-pass). Host 349/349, lint clean, esp32dev/c6/s3 compile clean. Co-authored-by: Claude Fable 5 <[email protected]>
edgeProbegains{passive:true}: no pad reconfiguration — only the triggered tight-loop sampler. Safe on pads owned by an armed receiver (active mode destroyed the RX arm).g_rmtrx_cb_raw_symbols,g_rmtrx_cb_first_raw).Findings (on #3586): pin 0 — the receiver's own pad — carries the full crisp PARLIO waveform through the jumper, yet the RMT hardware's raw callback delivers exactly ONE symbol spanning the whole frame as continuous HIGH (731 µs). Probe presence doesn't alter pass/fail. All registers byte-identical to working captures. Next step requires an oscilloscope or vendor-level RMT input-path review.
Host tests + lint clean; C6 compile clean.
Refs #3586.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
passiveoption and can be called with just a pin or with both pin and mode settings.Bug Fixes
Chores