Repository navigation
Description
Context
#2647 reported an ESP32-S3 LCD_CLOCKLESS interrupt watchdog panic for 8/16 lanes x 256 WS2812 LEDs. #2648 fixed that reported case by making the ISR-linked path IRAM/ISR-safe, using ISR-safe semaphore handling, setting LCD I80 trans_queue_depth = 2, forcing equal chunk sizes, and raising kDefaultChunkInputBytes to 1024 so typical frames fit in one chunk.
The original 16 lanes x 256 LEDs WS2812 frame is 768 source bytes per lane, so it now stays in a single chunk. That path was hardware-verified in #2648 with:
bash autoresearch esp32s3 --lcd --upload-port COM<x> --lanes 16 --strip-sizes 256 --skip-lint
TEST LCD_CLOCKLESS lanes=16 leds=4096 PASS 1694ms
Tests: 4/4 passed
Problem
The remaining limitation documented during #2647/#2648 is that the chunked-streaming ISR re-arm path still corrupts data after the first chunk. This affects frames that exceed the 1024-byte default source chunk size per lane, or tests that force a lower chunk size via setChunkInputBytesForTest().
Observed during the #2647 investigation:
- First chunk encoded/submitted from
beginTransmission()in task context is correct. - Later chunks encoded/submitted from
isrChunkDone()show roughly 87-92% byte corruption in RX-loopback captures. - The IWDT panic is gone after
trans_queue_depth = 2, but multi-chunk wire data remains incorrect.
Likely Areas
- Inter-chunk gap may exceed the WS2812 reset window when each
esp_lcd_panel_io_tx_color()call re-enters the LCD I80 command/data phase. ChannelData::getData()and related virtual dispatch happen in the ISR-side encode path and may not be suitable while flash cache is suspended.- Ring buffer reuse should be audited with
trans_queue_depth = 2and three encode buffers. - PARLIO's worker-task pattern is likely the cleaner long-term model: ISR signals a high-priority task, and the task encodes/submits the next chunk.
Acceptance Criteria
- An LCD_CLOCKLESS frame that is split across multiple chunks transmits byte-perfect through the AutoResearch RX-loopback path.
- At least one hardware validation covers a frame larger than 1024 source bytes per lane, for example WS2812 with
--lcd --lanes 1 --strip-sizes 400or an equivalent forced multi-chunk setup. - The existing
--lcd --lanes 16 --strip-sizes 256case from ESP32-S3 LCD_CLOCKLESS: interrupt watchdog timeout in ISR context with 8+ lanes × 256 LEDs WS2812 #2647 remains passing. - The fix does not reintroduce ISR-time blocking, variable-size panel IO recreation from ISR, or the interrupt watchdog panic fixed by fix(esp32-s3): LCD_CLOCKLESS chunk-ISR IRAM/ISR-safety + equal-chunk (#2647 WIP) #2648.
Related
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fix: stream LCD clockless chunks on ESP32-S3
fix: stream ESP32-S3 LCD clockless chunks (FastLED#2703)