Repository navigation
Description
Context
PR #3349 discussion exposed the remaining integration gap for LPC845 UART DMA: src/platforms/arm/lpc/uart_arm_lpc_dma.h exists and is already bench-tested by bash autoresearch lpc845 --dma-uart, but it is still only a raw transport helper. It is not wired into the Channels API, FastLED.addLeds<>, or FastLED.add(cfg).
Current state before this work:
FASTLED_LPC_UART_DMA=1enablesfl::ARMHardwareUARTOutputDMA<TX_PIN, BAUD>.bash autoresearch lpc845 --dma-uartvalidates raw async USART1 TX via DMA0 channel 3 while USART0 remains the RPC console.- LPC845 clockless AUTO/default routing still resolves to
Bus::BIT_BANG. - The existing SCT/DMA channel path is behind
FASTLED_LPC_PWM_DMA=1and usesBus::BIT_BANG. - There is no LPC
BusTraits<Bus::UART>channel engine yet.
Datasheet / primary source
Use the FastLED datasheets repo before guessing register behavior:
- LPC845 datasheet/user manual folder: https://github.com/FastLED/datasheets/tree/main/nxp/mcu/LPC845
- UM11029 facts used for this issue:
- Table 296 fixes USART1_RX/USART1_TX on DMA channels 2/3 and USART2_RX/USART2_TX on DMA channels 4/5.
- PINASSIGN1/PINASSIGN2 route USART1/USART2 TXD/RXD through SWM.
- USART CFG has LOOP, RXPOL, and TXPOL bits.
- The DMA initial descriptor word 0 is reserved; live transfer config is
CHANNEL[n].XFERCFG.
AutoResearch docs / runbooks
Agents implementing this should start from these docs and existing harnesses:
- Hardware AutoResearch agent runbook: https://github.com/FastLED/FastLED/blob/master/agents/docs/hardware-autoresearch.md
- LPC platform AutoResearch loopback notes: https://github.com/FastLED/FastLED/blob/master/src/platforms/arm/lpc/README.md#hardware-verification-via-autoresearch-loopback-2880
- Channels API / bus routing docs: https://github.com/FastLED/FastLED/blob/master/src/fl/channels/README.md
bash autoresearchwrapper and user-facing options: https://github.com/FastLED/FastLED/blob/master/autoresearch- Existing raw LPC UART DMA bench runner: https://github.com/FastLED/FastLED/blob/master/ci/autoresearch/test_lpc_uart_dma.py
- Existing device-side UART DMA RPC harness: https://github.com/FastLED/FastLED/blob/master/examples/AutoResearch/AutoResearchUartDma.h
- AutoResearch phase/build-flag wiring: https://github.com/FastLED/FastLED/blob/master/ci/autoresearch/phases.py
Important testing rule from the runbook: device serial must go through fbuild/RpcClient, not raw pyserial, and deploy remains fbuild deploy's job.
Proposal
Add an LPC845-only UART DMA clockless channel driver and make it the default clockless path when FASTLED_LPC_UART_DMA=1.
Expected routing:
Bus::AUTO/ defaultFastLED.addLeds<WS2812, PIN, GRB>(...)on LPC845 +FASTLED_LPC_UART_DMA=1selects UART DMA.- Explicit
fl::Bus::UARTselects the UART DMA channel driver. - Explicit
fl::Bus::BIT_BANGstill forces the bit-bang fallback. - Do not add per-USART public bus enums. Keep the public bus as
Bus::UART; hide USART instance choice behind the LPC driver/traits, since LPC845 has several USARTs and users should not need to pick a bus type manually.
Acceptance criteria
FASTLED_LPC_UART_DMA=1 FASTLED_LPC_DMA_ISR=1builds on LPC845.FastLED.addLeds<WS2812, PIN, GRB>(...)uses the UART DMA channel path by default on LPC845 whenFASTLED_LPC_UART_DMA=1.FastLED.add(cfg)withcfg.options.mBus = fl::Bus::AUTOalso selects UART DMA for clockless LPC845 output under the same flag.cfg.options.mBus = fl::Bus::UARTexplicitly selects UART DMA.cfg.options.mBus = fl::Bus::BIT_BANGremains a working explicit bit-bang override.- AutoResearch has a UART clockless loopback test that drives through the normal FastLED LED API, routes USART RXD through SWM to the configured
--rx-pin, captures via USART RX-DMA, and byte-compares the encoded WS2812 data. - The existing raw transport bench still passes:
bash autoresearch lpc845 --dma-uart. - New end-to-end acceptance passes on hardware:
bash autoresearch lpc845 --uart --tx-pin <TX> --rx-pin <RX>, using fbuild deploy/serial only.
Related
- WIP: LPC845 PWM+DMA driver implementation #3349 PR discussion: phatpaul asked how to test
FASTLED_LPC_UART_DMA; answer was that raw transport exists but channel/API wiring is missing. - LPC845-BRK: WS2812 loopback validation via SCT-capture RX channel #3015: LPC845 WS2812 loopback validation.
- META: LPC845 DMA driver completion — clockless + SPI, silicon-verified in one burn-down session #3517: LPC845 DMA driver completion groundwork.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity