Skip to content

[research] Teensy LED driver bring-up research log #3353

Closed

Description

@zackees

Important

This issue is no longer the meta/execution issue. It is now the research log for the Teensy LED driver bring-up task.

Use #3359 for the step-by-step execution plan, hypothesis test matrix, implementation checklist, AutoResearch run status, and acceptance decisions.

Continue storing raw research here when it belongs to the research record: datasheets, PJRC/NXP/forum links, errata validation, source-code evidence, newly discovered bugs, and technical hypotheses. If a discovery changes execution order or acceptance criteria, summarize it in #3359 and link the detailed evidence here.
?## Goal

Bring up the complete Teensy LED driver surface through the canonical AutoResearch workflow, with every supported driver either passing on hardware or explicitly classified as not yet covered / not applicable.

This is a comprehensive parent issue. Driver-specific bugs and implementation gaps should be filed as child issues and linked here. The first child is #3352 for the LPUART UnknownDriver bench repro.

Branch Directive

All implementation changes for this Teensy bring-up meta are directed to the teensy-fix branch.

  • Create follow-up work branches from teensy-fix, not from master, unless explicitly instructed otherwise.
  • Open PRs against teensy-fix so ObjectFLED, FlexIO, AutoResearch cleanup, wrapper-cheat removal, and related driver work accumulate together before final integration.
  • Keep emergency release/master stabilization separate from this bring-up stream.
  • If a change must target master directly, document the exception in the PR and link it back to this issue.

Operating Rules

AutoResearch is the control plane for this work.

  • Use bash autoresearch ... as the top-level entrypoint.
  • AutoResearch owns fbuild compile, deploy, serial monitor, JSON-RPC, pin setup, and reporting.
  • Do not run bash compile, direct fbuild, PlatformIO, manual serial monitors, or hand-written serial/RPC scripts unless AutoResearch itself is the component being debugged.
  • If a manual exception is required, document why AutoResearch could not perform that step.
  • Treat text serial output as diagnostics. JSON-RPC responses and AutoResearch exit status are the source of truth.
  • Do not hide failures by changing ERROR/diagnostic strings. Fix the driver, harness, timing, registration, or capability check.

Current Bench Baseline

Hardware observed during bring-up:

  • Board: Teensy 4.1
  • Port observed by AutoResearch: COM20
  • Observed GPIO-only loopback pair: GPIO 8 -> GPIO 9
  • Important correction: GPIO 8 -> GPIO 9 is valid for GPIO continuity only. It is not a valid Teensy LED capture pair because GPIO 9 is not supported by the current FlexPWM RX capture table.
  • Candidate real LED capture pair for the next solder/wiring pass: GPIO 8 -> GPIO 22.
  • Rationale: GPIO 8 is valid for both FlexIO and LPUART TX on Teensy 4.x, while GPIO 22 is supported by the FlexPWM RX capture path.

Validated GPIO-only command:

bash autoresearch teensy41 --tx-pin 8 --rx-pin 9 --timeout 2m

Validated GPIO-only wiring output:

Using CLI-specified pins: TX=8, RX=9
GPIO CONNECTIVITY PRE-TEST
Testing connection: TX (GPIO 8) -> RX (GPIO 9)
GPIO PRE-TEST PASSED
TX (GPIO 8) and RX (GPIO 9) are connected
PINS tx=8 rx=9

Do not use GPIO 8 -> GPIO 9 as proof of LED driver capture. For driver bring-up, move to a valid TX/RX capture pair such as:

--tx-pin 8 --rx-pin 22

Driver Inventory And Coverage Target

AutoResearch Primary Matrix

These are the drivers AutoResearch should be able to exercise for Teensy 4.x bring-up:

Driver AutoResearch selector Current expectation Status
GPIO-only pretest no driver flag Build/deploy/monitor, RPC boot, pin validation, GPIO loopback Not yet recorded in this meta
ObjectFLED --object-fled / OBJECT_FLED Clockless LED output through ObjectFLED DMA path Code-side stabilization merged in #3358; final pass waiting on valid RX capture wiring
FlexIO --flex-io / FLEX_IO Clockless LED output through Teensy FlexIO path Not yet recorded in this meta
LPUART --lpuart / LPUART Reserved future Teensy clockless path; not a real active driver yet Demoted from active matrix by #3357; implementation remains tracked by #3157
Combined matrix --all Runs the supported Teensy driver matrix honestly Not yet recorded in this meta

Secondary / Classification Required

These paths need explicit classification before this meta can claim complete Teensy LED driver coverage:

Path Question to resolve Desired outcome
SPI_UNIFIED / hardware SPI / clocked LED chipsets Should Teensy SPI channel drivers be in AutoResearch's Teensy matrix? Either add AutoResearch coverage or document why it is outside this matrix
Legacy WS2812SERIAL path Is this legacy-only or should AutoResearch validate it? Document exclusion or add coverage
Octo-style Teensy APIs Are these separate from the channels-API bring-up target? Document exclusion or add coverage
BIT_BANG fallback Should this be represented as GPIO-only / baseline or as a named driver test? Define and test the intended behavior

Verification Ladder

Run these in order. Do not start with --all; use it only after individual failures are understood.

  1. GPIO/RPC baseline:
bash autoresearch teensy41 --tx-pin 8 --rx-pin 9 --timeout 2m
  1. ObjectFLED single-driver bring-up:
bash autoresearch teensy41 --object-fled --tx-pin 8 --rx-pin 22 --timeout 2m
  1. FlexIO single-driver bring-up:
bash autoresearch teensy41 --flex-io --tx-pin 8 --rx-pin 22 --timeout 2m
  1. LPUART single-driver bring-up:
bash autoresearch teensy41 --lpuart --tx-pin 8 --rx-pin 22 --timeout 2m
# Expected today: fast-fail as reserved/unimplemented until #3157 lands
  1. Combined supported matrix:
bash autoresearch teensy41 --all --tx-pin 8 --rx-pin 22 --timeout 2m
  1. Once the basic commands pass, broaden coverage deliberately:
bash autoresearch teensy41 --object-fled --tx-pin 8 --rx-pin 22 --lanes 1-4 --timeout 2m
bash autoresearch teensy41 --flex-io --tx-pin 8 --rx-pin 22 --lanes 1-4 --timeout 2m
bash autoresearch teensy41 --all --tx-pin 8 --rx-pin 22 --frames 2 --timeout 2m
bash autoresearch teensy41 --all --tx-pin 8 --rx-pin 22 --tight-timing --timeout 2m

Adjust lane ranges only where the driver actually supports them. If a driver is single-lane by design, document that and keep the passing command single-lane.

Work Items

Harness / Baseline

  • Record a clean GPIO-only AutoResearch run with --tx-pin 8 --rx-pin 9.
  • Rewire or validate a real LED capture pair such as --tx-pin 8 --rx-pin 22.
  • Confirm AutoResearch's setPins command succeeds cleanly for the explicit pair, or file/fix a child issue if setPins reports failure despite GPIO pretest passing.
  • Ensure the firmware drivers/status surface is discoverable enough for the Python harness to preflight requested drivers.
  • Add or update tests so the Python AutoResearch driver matrix cannot drift ahead of firmware registration.

Driver Bring-Up

Coverage Classification

  • Decide whether SPI_UNIFIED / hardware SPI belongs in the AutoResearch Teensy matrix.
  • Decide how to represent BIT_BANG fallback in AutoResearch hardware validation.
  • Decide whether legacy WS2812SERIAL should be tested by AutoResearch or explicitly documented as legacy-only.
  • Decide whether Octo-style Teensy APIs need AutoResearch coverage or explicit exclusion.
  • Update docs/help text so --all means exactly what is tested on Teensy 4.x.

Wrapper Cheat Audit

  • Hunt down and remove all AutoResearch auto-wrapping, wrapper-side cheats, substitutions, silent skips, synthetic passes, and any other form of "cheating" that can make hardware bring-up look greener than it really is.
  • Search for driver-specific short-circuits such as is_teensy4 and driver == ..., __skip_with_pass, forced PASS rows, driver substitution/fallback masking, fake success wrappers, auto-selected alternate drivers, and wrapper-only success paths that do not reflect real firmware behavior.
  • Ensure every green AutoResearch result corresponds to real firmware execution, real selected-driver behavior, and JSON-RPC evidence, not a Python-side bypass or convenience wrapper.
  • If a driver is unavailable, AutoResearch must report an explicit unavailable/capability result or fail preflight; it must not silently substitute another driver, wrap the request in a different path, or mark the test passed.
  • Remove cheating behavior rather than documenting it as acceptable, unless the behavior is strictly non-driver control flow and cannot affect pass/fail status.
  • Keep diagnostic print volume low while doing this; do not add verbose FL_WARN/FL_PRINT output in timing-sensitive paths.

Documentation

  • Document that GPIO 8 -> GPIO 9 is GPIO-only and not valid for LED capture.
  • Document the recommended fixed LED capture pair after validation, currently expected to be GPIO 8 -> GPIO 22.
  • Document default driver pin constraints:
    • FlexIO TX-capable pins: {6,7,8,9,10,11,12,13,32}.
    • LPUART TX-capable pins: {1,8,14,17,20,24,29,35,47,48}.
  • Document that multiple permanent jumpers can confuse adjacent-pair auto-discovery unless explicit pins are supplied.
  • Document the AutoResearch-only workflow for Teensy driver bring-up.

Known Child Issues

Add future child issues here for ObjectFLED final capture failures after valid RX wiring, FlexIO, --all, SPI classification, setPins, or documentation gaps as they are found.

Current ObjectFLED Finding

#3358 merged the code-side stabilization needed before the next real ObjectFLED pass:

  • ObjectFLED DMA chunk sizing is now consistent across include order.
  • ObjectFLED waits for DMA completion before destruction and deletes the frame buffer with delete[].
  • AutoResearch keeps timing-sensitive test execution quiet while raw JSON-RPC responses still bypass log suppression.
  • Zero-capture failures now report captured byte counts without adding FL_WARN spam.
  • The Teensy 4 startup hook lives in a .cpp file so fbuild deploy avoids Arduino prototype/linkage issues.

Verification with current hardware still stops before ObjectFLED because the physical jumper is GPIO 8 -> GPIO 9, and RX pin 9 is not supported by the capture backend. The next ObjectFLED command needs a supported RX capture jumper, currently expected:

bash autoresearch teensy41 --object-fled --tx-pin 8 --rx-pin 22 --strip-sizes 1 --timeout 2m

ObjectFLED Information Sources

Architecture Correction

ObjectFLED must not be described as FlexIO unless a primary source proves that. The sources below point to ObjectFLED as a separate Teensy 4.x clockless output path built around QuadTimer/TMR4, XBAR, DMAMUX/eDMA, GPIO register writes, IOMUXC/GPR GPIO routing, and cache-aware DMA buffers. FlexIO is a separate FastLED driver path. Any flexioObjectFledTest wording means ObjectFLED TX captured by a FlexIO RX helper, not ObjectFLED TX implemented with FlexIO.

Useful hardware terms to search while debugging: ObjectFLED QTimer XBAR eDMA GPIO iMXRT1062, IOMUXC_GPR_GPR26 GPIO6 GPIO1 DMA ObjectFLED, DMAMUX_SOURCE_XBAR1_0 QTIMER4_TIMER0, TMR4 GPIO1_DR_SET GPIO1_DR_CLEAR, arm_dcache_flush_delete DMAMEM ObjectFLED.

Upstream And FastLED Integration

Source Link Why it matters
KurtMF/ObjectFLED canonical repo https://github.com/KurtMF/ObjectFLED Primary upstream project for the vendored driver. Describes Teensy 4.0/4.1 non-blocking DMA output across many digital pins.
ObjectFLED v1.1.0 release https://github.com/KurtMF/ObjectFLED/releases/tag/v1.1.0 Vendored source notes point to this release; release timing is January 2025.
ObjectFLED library metadata https://github.com/KurtMF/ObjectFLED/blob/main/library.properties Confirms ObjectFLED name, author/maintainer Kurt Funderburg, version, and repo URL.
ObjectFLED README FastLED notes https://github.com/KurtMF/ObjectFLED#using-objectfled-with-fastled Describes the FastLED built-in Teensy 4.x driver ported from ObjectFLED and the behavioral difference when directly including ObjectFLED.h.
ObjectFLED implementation source https://github.com/KurtMF/ObjectFLED/blob/main/OjectFLED.cpp Primary upstream implementation notes: GPIO bank grouping, TMR4, XBAR routing, DMAMUX/eDMA, timing, and context switching. No FlexIO TX path is present.
ObjectFLED release notes https://github.com/KurtMF/ObjectFLED/blob/main/RELEASE.md Notes v1.1.0 waveform timing changes for Teensy Audio / DMA coexistence and broader LED compatibility.
ObjectFLED examples https://github.com/KurtMF/ObjectFLED/tree/main/examples Direct upstream API usage examples, including FastLED and direct ObjectFLED usage.
ObjectFLED installation notes https://github.com/KurtMF/ObjectFLED/blob/main/INSTALLATION.md Useful when comparing FastLED vendored code against upstream release ZIPs.
ObjectFLED issue #2 KurtMF/ObjectFLED#2 Cross-posts the FastLED / Teensy Audio interaction and is relevant to timing-sensitive DMA behavior.
ObjectFLED PR #1 KurtMF/ObjectFLED#1 Removed Arduino.h dependency; compile-tested on Teensy 4.0 and 4.1.
ObjectFLED PR #3 KurtMF/ObjectFLED#3 Maintainer discussion explains draw-buffer / frame-buffer behavior during show().
PJRC blog: FastLED adds Massive Parallel LED Output https://www.pjrc.com/fastled-adds-massive-parallel-led-output/ Official PJRC post credits Kurt Funderburg's ObjectFLED driver and describes non-blocking DMA on Teensy 4.0/4.1.
FastLED release notes https://github.com/FastLED/FastLED/blob/master/release_notes.md FastLED 3.9.8 introduced ObjectFLED-based Teensy massive parallel support; 3.9.10 rebased timing to upstream 1.1.0.
FastLED ObjectFLED example https://github.com/FastLED/FastLED/blob/master/examples/SpecialDrivers/Teensy/ObjectFLED/TeensyMassiveParallel/TeensyMassiveParallel.ino Records FastLED's ObjectFLED integration and massive parallel usage pattern.

PJRC And Community References

Source Link Why it matters
PJRC forum: FastLED now has 50-pin parallel Teensy 4.1 WS2812 support https://forum.pjrc.com/index.php?threads/fastled-now-has-50-pin-parallel-teensy-4-1-ws2812-support.76316/ Launch thread for the ObjectFLED-backed FastLED integration; discusses 50-pin DMA claims and Audio/DMA timing interaction.
PJRC forum: New Release ObjectFLED 1.1.0 https://forum.pjrc.com/index.php?threads/new-release-objectfled-1-1-0-fast-teensy-dma-driver-for-fast-leds.76343/ Author release thread; v1.1.0 timing changes are directly relevant to current bring-up.
PJRC forum: Upcoming Driver Upgrade to 50 pin ObjectFLED Driver https://forum.pjrc.com/index.php?threads/fastled-teensy-4-0-and-4-1-users-upcoming-driver-upgrade-to-50-pin-objectfled-driver.76384/ FastLED integration/default-driver announcement; compares ObjectFLED with OctoWS2811.
PJRC forum: Artnet and ObjectFLED https://forum.pjrc.com/index.php?threads/artnet-and-objectfled.77329/ User migration context for ObjectFLED / FastLED multi-output usage.
PJRC forum: Teensy 4.1 How to start using DMA? https://forum.pjrc.com/index.php?threads/teensy-4-1-how-to-start-using-dma.63353/ Paul Stoffregen explains routing timer output through XBAR to DMA request generators, matching the non-FlexIO architecture shape.
PJRC OctoWS2811 library page https://www.pjrc.com/teensy/td_libs_OctoWS2811.html ObjectFLED is OctoWS2811-inspired; documents Teensy DMA LED-output lineage and Teensy 4.x arbitrary-pin behavior.
PJRC Non-Blocking WS2812 LED Library https://www.pjrc.com/non-blocking-ws2812-led-library/ Background on WS2812Serial: serial-port DMA, non-blocking output, and the older Teensy LED-output ecosystem.
Teensyduino release notes https://www.pjrc.com/teensy/td_download.html Notes WS2812Serial / OctoWS2811 Teensy 4.x ports and any-pin support history.
FastLED issue #1818 #1818 Tracks Teensy Audio conflict after switching from WS2812Serial to ObjectFLED.
FastLED issue #3340 #3340 Current ObjectFLED default-driver crash report for multiple Teensy 4.x clockless strips.
FastLED issue #3176 #3176 Explicitly contrasts ObjectFLED with FlexIO: ObjectFLED is timer+DMA / any-GPIO, while FlexIO is pin-restricted.
FastLED issue #3023 #3023 Driver registry meta lists Bus::FLEX_IO and Bus::OBJECT_FLED as separate Teensy 4.x engines.

Official NXP / Teensy Hardware References

Source Link Why it matters
NXP i.MX RT1060 product portal https://www.nxp.com/products/i.MX-RT1060 Canonical NXP landing page for RT1060 docs, errata, app notes, and latest reference manual metadata.
i.MX RT1060 Processor Reference Manual https://www.nxp.com/webapp/Download?colCode=IMXRT1060RM Primary register source for eDMA, DMAMUX, QTMR/TMR4, XBARA1, IOMUXC/GPR, GPIO, CCM clocks, FlexIO, FlexPWM, cache, and memory map. NXP login may be required.
PJRC datasheets index https://www.pjrc.com/teensy/datasheets.html Accessible PJRC route to the RT1060 reference manual used by Teensy developers when NXP login blocks the latest PDF.
i.MX RT1060 consumer data sheet https://www.nxp.com/docs/en/nxp/data-sheets/IMXRT1060CEC.pdf Datasheet for the MIMXRT1062 class parts used by Teensy 4.x; confirms major peripherals and memory/cache features.
MIMXRT1062DVJ6B part page https://www.nxp.com/part/MIMXRT1062DVJ6B Exact MCU family/variant anchor for newer Teensy 4.1 boards.
PJRC Teensy 4.1 board page https://www.pjrc.com/store/teensy41.html Board-level truth for processor variant, pin count, DMA note, schematic/pinout links, and errata applicability by board date.
PJRC Teensy pinout https://www.pjrc.com/teensy/pinout.html Cross-check Teensy digital pins against RT1062 pads, PWM/FlexIO capabilities, and ObjectFLED GPIO bank grouping.
AN12240 Enhanced Features in i.MX RT1060 https://www.nxp.com/docs/en/application-note/AN12240.pdf Explains OCRAM/FlexRAM, tightly-coupled GPIO, IOMUXC_GPR GPIO routing, and FlexIO instance/clock differences.
AN12077 Using the i.MX RT FlexRAM https://www.nxp.com/docs/en/application-note/AN12077.pdf Relevant to DMA-visible memory placement and DTCM/OCRAM/FlexRAM choices.
AN12042 Using the i.MXRT L1 Cache https://www.nxp.com/docs/en/application-note/AN12042.pdf Directly relevant to DMAMEM, 32-byte alignment, arm_dcache_flush_delete, and DMA coherency failures.
MCUXpresso eDMA docs https://mcuxpresso.nxp.com/api_doc/dev/2337/a00090.html Practical companion for TCD fields, channel arbitration, scatter/gather, major-loop interrupts, and DMA request behavior.
MCUXpresso DMAMUX docs https://mcuxpresso.nxp.com/api_doc/dev/2337/a00088.html ObjectFLED depends on routing XBAR1 outputs to eDMA channels through DMAMUX.
MCUXpresso QTMR docs https://mcuxpresso.nxp.com/api_doc/dev/2337/a00111.html ObjectFLED uses TMR4 / QuadTimer channels to generate WS281x timing edges.
MCUXpresso XBAR docs https://mcuxpresso.nxp.com/api_doc/dev/2337/a00031.html Documents the interconnect model behind xbar_connect(QTIMER4_TIMERx, DMA_CH_MUX_REQxx).
MCUXpresso IOMUXC docs https://mcuxpresso.nxp.com/api_doc/dev/2322/a00106.html Useful for pad mux, pad control, SION, drive strength, and GPR routing details.
MCUXpresso GPIO docs https://mcuxpresso.nxp.com/api_doc/dev/3151/a00041.html Companion reference for GPIO register semantics; ObjectFLED writes GPIO set/clear registers via DMA.
MCUXpresso FlexIO docs https://mcuxpresso.nxp.com/api_doc/dev/919/group__flexio.html Relevant to the separate FastLED FlexIO path and FlexIO RX/debug experiments, not proof that ObjectFLED TX is FlexIO.
NXP Introduction to FlexIO https://www.nxp.com/docs/en/supporting-information/FTF-ACC-F1179_Introduction_to_FlexIO.pdf Conceptual FlexIO reference for keeping FlexIO-specific assumptions out of ObjectFLED unless deliberately debugging the FlexIO path.
AN12174 Using FlexIO to Emulate Communications and Timing Peripherals https://www.nxp.com/docs/en/application-note/AN12174.pdf FlexIO application note for the separate FlexIO driver/debug path.
NXP community: FlexIO match continuous mode https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FlexIO-not-working-in-Match-Continuous-Mode/td-p/1300508 Community/support context for FlexIO capture traps; relevant to RX experiments, not ObjectFLED TX architecture.
MCUXpresso eFlexPWM docs https://mcuxpresso.nxp.com/api_doc/dev/2337/a00109.html Relevant to FlexPWM RX bring-up and comparing capture behavior.
MCUXpresso PWM input capture docs https://mcuxpresso.nxp.com/api_doc/dev/4558/a00058.html Documents capture controls/status used by the FlexPWM RX capture path.
i.MX RT1060_B errata https://www.nxp.com/docs/en/errata/IMXRT1060CE_B.pdf Sanity check for cache, QTMR, and other silicon errata on newer Teensy 4.1 boards.

Local FastLED Code Anchors

  • src/third_party/object_fled/readme: vendored upstream URL, v1.1.0 release URL, downloaded date, and note that local modifications exist.
  • src/third_party/object_fled/src/OjectFLED.cpp.hpp: main vendored implementation. Key hardware clues include TMR4_*, XBARA1_*, DMAMUX_SOURCE_XBAR1_0/1/2, GPIO1_DR_SET, GPIO1_DR_CLEAR, IOMUXC_GPR_GPR26, DMA_TCD_*, DMAMEM, and cache flushes.
  • src/third_party/object_fled/src/ObjectFLEDDmaManager.h: shared ObjectFLED DMA singleton and buffers.
  • src/third_party/object_fled/src/ObjectFLEDPinValidation.h: Teensy 4.x pin validation and warnings, based on FastLED pin mapping.
  • src/platforms/arm/teensy/teensy4_common/clockless.h: Teensy 4.x default ClocklessController aliases to the ObjectFLED proxy.
  • src/platforms/arm/teensy/teensy4_common/clockless_objectfled.h and .cpp.hpp: legacy/proxy ObjectFLED integration path.
  • src/fl/channels/bus.h: Bus::OBJECT_FLED, Teensy 4.x default clockless bus selection, and busName() mapping.
  • src/platforms/arm/teensy/teensy4_common/drivers/objectfled/channel_engine_objectfled.*: channels-API ObjectFLED engine, timing grouping, and hardware instance caching.
  • src/platforms/arm/teensy/teensy4_common/drivers/objectfled/objectfled_peripheral_real.cpp.hpp: real hardware wrapper around fl::ObjectFLED.
  • tests/platforms/arm/teensy/teensy4_common/drivers/objectfled/channel_engine_objectfled.cpp: unit coverage for timing validation, grouping, RGBW detection, invalid pins, and driver name.
  • examples/AutoResearch/AutoResearchRemoteDriverMethods.cpp: flexioObjectFledTest is ObjectFLED TX captured by FlexIO RX. Do not read that name as ObjectFLED using FlexIO TX.
  • ci/autoresearch/test_flexio_rx_objectfled.py: host helper for the same special loopback path; use canonical bash autoresearch ... --object-fled for this meta unless debugging AutoResearch itself.

ObjectFLED Bug / Errata Investigation Queue

Audit date: 2026-06-24. This section intentionally distinguishes confirmed wrong items from worth investigating items. Not every item is expected to explain the current GPIO 8 -> GPIO 22 zero-capture failure, but every item is relevant to making ObjectFLED honest and stable on Teensy 4.x.

Confirmed Wrong / Actionable Bugs

Priority Finding Evidence Why it matters Action
Critical Legacy Teensy ClocklessController ObjectFLED path does not reliably flush frames. src/platforms/arm/teensy/teensy4_common/clockless.h:23; src/FastLED.cpp.hpp:253; src/platforms/arm/teensy/teensy4_common/clockless_objectfled.h:186; src/platforms/arm/teensy/teensy4_common/clockless_objectfled.h:212 beginShowLeds() flushes other groups before pixels are queued, endShowLeds() does not flush, and flushAll() is effectively unhooked. This breaks the default legacy addLeds<> path. Move ObjectFLED flush to a real frame-end/post-showPixels() phase and keep registry entries valid. Add regression coverage for two same-timing strips.
Critical Legacy ObjectFLED wrapper constructs ObjectFLED with drawBuffer == nullptr, then show() dereferences it. src/platforms/arm/teensy/teensy4_common/clockless_objectfled.cpp.hpp:209; src/third_party/object_fled/src/OjectFLED.cpp.hpp:505; upstream basis: https://github.com/KurtMF/ObjectFLED/blob/v1.1.0/OjectFLED.cpp#L463 show() always calls genFrameBuffer(), which reads drawBuffer. This can crash or fault in default ObjectFLED usage. Set drawBuffer = frameBufferLocal in the legacy wrapper or add an explicit raw/preformatted framebuffer transmit path that skips genFrameBuffer().
High Legacy same-timing multi-strip queuing finalizes the rectangular buffer too early. src/platforms/arm/teensy/teensy4_common/clockless_objectfled.cpp.hpp:113; src/fl/gfx/rectangular_draw_buffer.cpp.hpp:50; FastLED #3340: #3340 addStrip() calls onQueuingDone() per strip. Later strips queue after QUEUE_DONE, so the pin map is not rebuilt and release builds can write through an empty/null span. This matches the 3.10.4 multi-strip crash report. Queue all strips first, finalize once during flush, and add release-mode guards for missing pin spans.
High Both wrappers can overwrite frameBufferLocal before ObjectFLED waits for prior non-blocking DMA. src/platforms/arm/teensy/teensy4_common/drivers/objectfled/channel_engine_objectfled.cpp.hpp:211; src/platforms/arm/teensy/teensy4_common/clockless_objectfled.cpp.hpp:168; src/third_party/object_fled/src/OjectFLED.cpp.hpp:479; src/third_party/object_fled/src/OjectFLED.cpp.hpp:571; upstream README notes non-blocking DMA: https://github.com/KurtMF/ObjectFLED/blob/v1.1.0/README.md ObjectFLED waits inside show(), but FastLED copies new pixels into the framebuffer before calling show(). Long-strip DMA refill can read a buffer that is being modified. Wait before any framebuffer write, or use a separate draw buffer and let ObjectFLED copy after dma.acquire().
High Channel engine reports READY while ObjectFLED DMA is still active. src/platforms/arm/teensy/teensy4_common/drivers/objectfled/channel_engine_objectfled.h:4; src/platforms/arm/teensy/teensy4_common/drivers/objectfled/channel_engine_objectfled.cpp.hpp:242; src/third_party/object_fled/src/OjectFLED.cpp.hpp:568 FastLED.wait() / ChannelManager waits can return early. Comments claim synchronous DMA, but ObjectFLED releases while transmission continues. Expose busy/wait state through IObjectFLEDInstance or IObjectFLEDPeripheral; return DRAINING/BUSY until DMA completes.
High FASTLED_NOT_USES_OBJECTFLED and FASTLED_USES_OBJECTFLED are documented but not implemented. README.md:594; README.md:605; release_notes.md:660; release_notes.md:750; repo search finds no implementation. Users cannot opt out of a broken default path even though docs say they can. This is especially serious while #3340 is open. Implement the macros or remove the documentation. If implemented, route Teensy 4.x back to legacy bitbang when disabled.
High ChannelEngineObjectFLED::canHandle() filters only on timing period, not clockless encoder type. src/platforms/arm/teensy/teensy4_common/drivers/objectfled/channel_engine_objectfled.cpp.hpp:60; src/fl/channels/config.h:31; src/fl/chipsets/led_timing.h:488 ObjectFLED assumes rectangular WS2812-style RGB/RGBW byte layout but may claim UCS7604 or other encoded clockless protocols with compatible bit periods. Reject unsupported ClocklessEncoder values explicitly; add tests for UCS7604 and any non-WS2812 encoders.
High Channel-engine RGBW detection is byte-count based and misclassifies valid RGBW lengths. src/platforms/arm/teensy/teensy4_common/drivers/objectfled/channel_engine_objectfled.cpp.hpp:143; test only covers one RGBW LED at tests/platforms/arm/teensy/teensy4_common/drivers/objectfled/channel_engine_objectfled.cpp:236 RGBW strips with 3, 6, 9, etc. pixels have byte counts divisible by both 4 and 3, so they are treated as RGB. Carry explicit bytes-per-pixel / RGBW metadata into ChannelData or derive it from channel options, not byte-count modulo.
High Channel RGBW path self-copies preformatted 4-byte RGBW through ObjectFLED's 3-byte RGB-to-RGBW converter. src/platforms/arm/teensy/teensy4_common/drivers/objectfled/objectfled_peripheral_real.cpp.hpp:84; src/third_party/object_fled/src/OjectFLED.cpp.hpp:335; upstream RGBW constants: https://github.com/KurtMF/ObjectFLED/blob/v1.1.0/ObjectFLED.h CORDER_RGBW reads source as 3-byte RGB and writes 4-byte RGBW, while FastLED's channel data may already be 4-byte RGBW. Self-copy can corrupt RGBW data. Add a raw/preformatted framebuffer mode, or feed ObjectFLED a separate 3-byte source buffer when asking it to synthesize W.
High genFrameBuffer() uses uint16_t loop counters for buffers that can exceed 64 KiB. src/third_party/object_fled/src/OjectFLED.cpp.hpp:336; src/third_party/object_fled/src/OjectFLED.cpp.hpp:381; src/third_party/object_fled/src/OjectFLED.cpp.hpp:407 ObjectFLED targets tens of thousands of pixels; 16-bit loop counters can wrap and cause hangs/corruption. Convert buffer indexes and loop counters to u32/size_t; add large-buffer tests.
High Most CORDER_*W constants are advertised but not implemented safely. src/third_party/object_fled/src/ObjectFLED.h:71; src/third_party/object_fled/src/OjectFLED.cpp.hpp:335 genFrameBuffer() only special-cases CORDER_RGBW; other RGBW orders fall into 3-byte RGB loops over 4-byte buffers. Implement every advertised RGBW order or reject unsupported RGBW orders clearly.
Medium Direct fl::ObjectFLED invalid-pin handling leaves uninitialized pin metadata live. src/third_party/object_fled/src/OjectFLED.cpp.hpp:145; src/third_party/object_fled/src/OjectFLED.cpp.hpp:488; src/third_party/object_fled/src/OjectFLED.cpp.hpp:527 Invalid pins are skipped but numpinsLocal remains unchanged. show() can later iterate uninitialized metadata. Compact valid pins/segments, set numpinsLocal = validPinCount, return a status from begin(), and make show() a no-op after failed init.
Medium ObjectFLEDDmaManager::waitForCompletion() can spin forever. src/third_party/object_fled/src/ObjectFLEDDmaManager.cpp.hpp:33 A stalled or never-started DMA channel can hang the firmware. This is risky during hardware bring-up. Add bounded waits, error state, and register dump hooks for stalled DMA.
Medium DMA context restore is keyed only by frameBufferLocal pointer equality. src/third_party/object_fled/src/OjectFLED.cpp.hpp:482 A rebuilt instance reusing the same heap address could skip pin/timing/DMA context restore. This is plausible after teardown/recreate. Use an owner/generation key or always restore context before transmit.
Medium Upstream overclock API/behavior is not preserved. Upstream v1.1.0 begin(double OCF, ...): https://github.com/KurtMF/ObjectFLED/blob/v1.1.0/ObjectFLED.h#L109; upstream timing scaling: https://github.com/KurtMF/ObjectFLED/blob/v1.1.0/OjectFLED.cpp#L175; FastLED raw timing path: src/third_party/object_fled/src/OjectFLED.cpp.hpp:214; upstream examples still use FASTLED_OVERCLOCK: https://github.com/KurtMF/ObjectFLED/blob/main/examples/UsesFastLED/UsesFastLED.ino FastLED removed or bypassed an upstream tuning surface that is relevant to older WS2812B strips and timing margin. Either implement FastLED overclock scaling consistently or remove/rename the advertised knobs and stale comments.
Low Vendored metadata is stale/ambiguous. src/third_party/object_fled/readme:3; upstream tag: https://github.com/KurtMF/ObjectFLED/releases/tag/v1.1.0 The local readme says Version 1.10, omits the vendored commit, and does not list FastLED-specific source changes. Record upstream commit/tag, note main is docs-only drift after v1.1.0, and list intentional modifications.

AutoResearch / Wrapper Bugs To Fix During Bring-Up

Priority Finding Evidence Impact Action
High Wrapper fallback pins can diverge from firmware pins. Wrapper defaults: ci/autoresearch/context.py:21; Teensy firmware default RX: examples/AutoResearch/AutoResearchPlatform.h:32; fallback path: ci/autoresearch/phases.py:1477; runSingleTest uses firmware state: examples/AutoResearch/AutoResearchRemoteRunSingleTest.cpp:380 Host pretest/status may say one pair while firmware tests another. Query firmware pins after connect, or always send setPins after fallback; include actual pinTx/pinRx in result JSON.
High FLEX_IO injects a hidden TX pin substitution. ci/autoresearch/phases.py:753; status reports ctx.effective_tx_pin at ci/autoresearch/phases.py:2437 Pretest/status can validate one pair while actual test drives another. This is wrapper-side cheating unless fully surfaced. Require explicit pins for --flex-io, or make injected pins visible and consistent through pretest/status.
High ObjectFLED docs/tools steer users to flexioObjectFledTest instead of canonical runSingleTest. agents/docs/hardware-autoresearch.md:346; ci/autoresearch/test_flexio_rx_objectfled.py:147; examples/AutoResearch/AutoResearchRemoteDriverMethods.cpp:211 Direct serial/special RPC bypasses the normal AutoResearch build/flash/pin/pretest/reporting path and can be mistaken for canonical ObjectFLED validation. Document flexioObjectFledTest as diagnostic-only. Primary validation must be bash autoresearch ... --object-fled / runSingleTest.
Medium Agent docs are stale and omit ObjectFLED/FlexIO commands. agents/docs/hardware-autoresearch.md:8; parser supports current flags in ci/autoresearch/args.py:210; docs say 120s default at agents/docs/hardware-autoresearch.md:52, parser default is 30s at ci/autoresearch/args.py:405 Agents may run nonexistent or wrong commands and miss the canonical ObjectFLED path. Regenerate docs from current CLI help; add explicit Teensy ObjectFLED/FlexIO examples with pins.
Medium Pin-discovery help promises testedPairs, but firmware omits it. Help: examples/AutoResearch/AutoResearchRemotePinMethods.cpp:529; omitted due heap concerns: examples/AutoResearch/AutoResearchRemote.cpp:229 Failed discovery lacks enough diagnostics to understand what was tested. Either remove testedPairs from help or return compact diagnostics such as tested count/range/candidate pairs/final levels.
Medium Generic Teensy/ObjectFLED paths still say RMT/ESP32. examples/AutoResearch/AutoResearch.ino:24; examples/AutoResearch/AutoResearch.ino:406; examples/AutoResearch/AutoResearchRemoteRunSingleTest.cpp:549 Teensy ObjectFLED failures can be mislabeled as RMT failures. Carry actual RX backend/device type through config/results and use platform-neutral messages.
Low Timeout status is hardcoded to 120s. Actual timeout uses deadline at ci/autoresearch/phases.py:2492; error text prints 120s at ci/autoresearch/phases.py:2607 Logs misrepresent how long ObjectFLED actually ran. Print computed per-call timeout or configured total deadline.
Low Teensy skips schema validation entirely. ci/autoresearch/phases.py:1366 Wrapper/firmware RPC drift on the target may only appear at runtime. Keep full schema skipped if needed, but add lightweight method/parameter contract checks for runSingleTest.
Low Legacy wrapper scripts still use removed RPC names. agents/docs/hardware-autoresearch.md:344; ci/autoresearch_agent.py:185 Anyone using the older wrapper can fail before reaching canonical runSingleTest. Deprecate loudly or rewrite these scripts around current RPC methods.

NXP / PJRC Errata And Hardware Traps Worth Investigating

Priority Trap / Erratum Sources Relevance Action
High DMAMUX source sharing is unpredictable. ObjectFLED consumes XBAR1 outputs 0/1/2 via DMAMUX requests 30/31/94. i.MX RT1060 RM Rev. 3: https://www.pjrc.com/teensy/IMXRT1060RM_rev3.pdf If any other DMA channel uses the same source, behavior is undefined even if one channel is disabled. Dump XBARA1_SEL*, XBARA1_CTRL*, all DMAMUX_CHCFG[n], DMA_ERQ, and DMA channel ownership after failure. Confirm no other subsystem owns XBAR1 DMA req 0/1/2 or DMAMUX sources 30/31/94.
High GPIO1-4 vs fast GPIO6-9 routing can create perfect zero output. RM Rev. 3: https://www.pjrc.com/teensy/IMXRT1060RM_rev3.pdf; AN12240: https://www.nxp.com/docs/en/application-note/AN12240.pdf Teensy defaults to fast GPIO6-9, while ObjectFLED clears IOMUXC_GPR_GPR26-29 bits and writes standard GPIO1-4 via DMA. If routing remains fast GPIO, GPIO DMA writes may not reach the pad. For each ObjectFLED pin, verify its GPR bit is 0 before transmit. Dump GPR26-29 before/after begin(), after pinMode, and after failure. Avoid mixed fast-GPIO access on ObjectFLED-owned pins.
High QTMR4 is a shared resource. RM Rev. 3: https://www.pjrc.com/teensy/IMXRT1060RM_rev3.pdf ObjectFLED uses TMR4 channels 0-2. PWM/tone/timer code touching QTMR4 or TMR4_ENBL can kill the edge stream that triggers DMA. Reserve TMR4 ch0-2 exclusively during ObjectFLED. Test with PWM/tone/timer libraries disabled. Add TMR4 snapshots around failure.
High DMA/cache coherency is easy to get wrong on i.MX RT1060. AN12042: https://www.nxp.com/docs/en/application-note/AN12042.pdf OCRAM is cacheable by default. CPU writes may remain in D-cache; DMA-written capture buffers require invalidate before CPU reads; buffers need 32-byte alignment. Keep DMA buffers aligned in DMA-visible memory. Clean before TX DMA and invalidate/delete after RX DMA. Audit RX capture paths especially.
Medium eDMA TCD sequencing/reuse can cause flaky behavior. RM Rev. 3: https://www.pjrc.com/teensy/IMXRT1060RM_rev3.pdf TCDs should be initialized before requests are enabled; active channels need careful request disable/pending/error handling before reuse/scatter-gather changes. On failure dump DMA_ES, DMA_ERR, DMA_HRS, DMA_ERQ, and TCD CSR/CITER/BITER for DMA1/2/3. Add explicit error clearing and bounded waits during investigation.
Medium NXP ERR050194 QTMR overflow/OFLAG behavior. NXP PCN: https://www.nxp.com/pcn/201908004I; errata PDF: https://www.nxp.com/docs/en/nxp/errata/IMXRT1060CE.pdf ObjectFLED appears to use compare/OFLAG with OUTMODE(3), not the exact overflow mode, so this is not proven. Still worth checking if TMR4 state is wrong during zero output. Dump TMR4_CTRL0/1/2, SCTRL, CSCTRL, COMP1, CMPLD1, CNTR, and ENBL when output is zero. Confirm no other code changes TMR4 mode.
Low NXP ERR011572 Cortex-M7 write-through cache. NXP PCN: https://www.nxp.com/pcn/201908004I Relevant only if MPU/cache policy is changed to write-through. Check CACR, MPU region policy, and any FORCEWT/write-through setup. Prefer write-back with explicit clean/invalidate or non-cacheable DMA buffers.
Medium PJRC electrical caveats: 3.3V output, drive strength, slew, grounding, and level shifting. Teensy 4.0: https://www.pjrc.com/store/teensy40.html; Teensy 4.1: https://www.pjrc.com/store/teensy41.html; tech specs: https://www.pjrc.com/teensy/techspecs.html; OctoWS2811 guidance: https://www.pjrc.com/teensy/td_libs_OctoWS2811.html Marginal WS2812 input thresholds, long wires, weak ground, or heavy loading can look like flaky output. Same-board loopback zero capture is less likely to be electrical, but real strips need this. Scope the pin and LED input. Use short wiring/common ground/series resistance; validate with 74HCT/AHCT buffer for real LED strips.
Medium Pin 13 and shared bus pins can mislead baseline tests. PJRC board docs: https://www.pjrc.com/store/teensy40.html Pin 13 has onboard LED load; SPI/I2C/UART pins may be claimed by libraries. Avoid pin 13 and active bus pins during baseline. Validate first on simple pins across known GPIO banks.

Community / Release History To Keep In Regression Coverage

Highest-Value Next Diagnostics

  1. Add an AutoResearch OBJECT_FLED diagnostic response that snapshots GPR26-29, XBARA1_SEL/CTRL, DMAMUX_CHCFG, DMA_ES/ERR/HRS/ERQ, DMA1/2/3 TCD state, and TMR4_* before transmit and after zero capture.
  2. Prove ObjectFLED pin 8 is routed to standard GPIO1-4 before transmit; if GPR routing is wrong, zero output is expected.
  3. Prove no other subsystem owns XBAR1 DMA req 0/1/2, DMAMUX sources 30/31/94, or TMR4 ch0-2.
  4. Fix the legacy default path bugs (multi strip problem #3340 class) separately from the channels-API runSingleTest failure so default addLeds<> and AutoResearch ObjectFLED both become honest.
  5. Keep the AutoResearch validation path canonical: bash autoresearch teensy41 --object-fled --tx-pin 8 --rx-pin 22 ...; do not treat flexioObjectFledTest or raw serial scripts as pass/fail authority.

Current LPUART Finding

The LPUART bench repro was not a wiring issue. AutoResearch validated GPIO 8 -> GPIO 9, then failed because LPUART was not found in the firmware driver's available list. #3357 demoted LPUART from the active matrix because it is reserved but not a real implemented Teensy driver yet.

Likely code paths to inspect:

  • ci/autoresearch/args.py
  • ci/autoresearch/phases.py
  • examples/AutoResearch/AutoResearchRemoteRunSingleTest.cpp
  • src/platforms/arm/teensy/teensy4_common/init_channel_driver_mxrt1062.cpp.hpp
  • src/platforms/arm/teensy/teensy4_common/drivers/_build.cpp.hpp
  • src/platforms/arm/teensy/teensy4_common/drivers/lpuart/

Observed mismatch:

  • AutoResearch accepts/selects --lpuart.
  • runSingleTest validates requested drivers against mState->drivers_available.
  • The Teensy channel init path appears to register FlexIO, ObjectFLED, and SPI, but not LPUART.

Acceptance Criteria

This meta is complete when:

  • GPIO-only baseline passes on Teensy 4.1 with GPIO 8 -> GPIO 9.
  • Real LED capture baseline passes on Teensy 4.1 with a valid RX pin such as GPIO 22.
  • Every supported Teensy AutoResearch LED driver has a recorded passing command.
  • bash autoresearch teensy41 --all --tx-pin 8 --rx-pin 22 --timeout 2m is green for the supported matrix, with LPUART intentionally omitted until feat(lpuart): finish Teensy 4 LPUART engine + encoder + bus_traits + canHandle() host test (split from #3122 B1 / refs #3023) #3157 lands.
  • AutoResearch preflights unavailable requested drivers before spending time on hardware setup.
  • All AutoResearch auto-wrapping, wrapper-side cheats, substitutions, silent skips, synthetic passes, and fake-success paths have been hunted down and removed, except strictly non-driver control flow that cannot affect pass/fail status.
  • The Python driver flags, firmware registered drivers, help text, and docs agree for Teensy 4.x.
  • Secondary Teensy LED paths (SPI_UNIFIED, legacy WS2812SERIAL, Octo-style APIs, BIT_BANG) are either covered or explicitly classified as out of scope.
  • All child issues linked from this meta are closed or deliberately moved to a follow-up meta.

Related Issues

Anti-Goals

  • Do not make --all green by silently skipping broken drivers.
  • Do not reintroduce auto-wrapping, wrapper-side driver substitution, fake-success wrappers, silent skips, or any other pass/fail cheat.
  • Do not add new one-off example sketches for this bring-up; use examples/AutoResearch/AutoResearch.ino unless this meta explicitly decides otherwise.
  • Do not claim complete Teensy LED coverage until the secondary paths are either tested or intentionally excluded.

Activity

  1. changed the title [-][meta] Bring up all Teensy LED drivers through AutoResearch[/-] [+][meta] Comprehensive Teensy LED driver bring-up through AutoResearch[/+] on Jun 24, 2026
  2. zackees commented on Jun 24, 2026

    @zackees
    MemberAuthor

    Progress update: GPIO-only baseline passed on Teensy 4.1 with --tx-pin 8 --rx-pin 9. While running ObjectFLED, AutoResearch exposed a harness bug: successful control RPCs such as \setPins\ were being reported as failed tests because they return \success: true\ without a \passed\ field. Local patch + unit regression now classify those as command success; ObjectFLED still fails on real capture with 100% byte corruption and remains under investigation.

  3. zackees commented on Jun 24, 2026

    @zackees
    MemberAuthor

    Merged first harness fix: PR #3354 teaches AutoResearch to treat successful control RPCs without a \passed\ field, such as \setPins, as command success instead of failed driver tests. Focused local tests passed before merge. Continuing with the remaining ObjectFLED real-capture failure.

  4. zackees commented on Jun 24, 2026

    @zackees
    MemberAuthor

    Child issue filed: #3355 for the invalid \GPIO 8 -> GPIO 9\ fixed pair. GPIO continuity passes, but GPIO 9 is not FlexPWM RX-capable on Teensy 4.x, so LED capture decodes zero bytes. Local fix now rejects unsupported/dummy RX backends before driver tests. Candidate replacement pair to physically validate: \GPIO 8 -> GPIO 22\ because 8 is FlexIO/LPUART TX-capable and 22 is FlexPWM RX-capable.

  5. zackees commented on Jun 24, 2026

    @zackees
    MemberAuthor

    Second-Pass Deep Technical Errata / Bug Audit

    This pass focused on validating whether the ObjectFLED failures are likely NXP silicon errata, PJRC-core resource conflicts, ObjectFLED driver bugs, or AutoResearch false-positive paths.

    Key Correction: Do Not Blame eDMA/XBAR/DMAMUX Silicon Yet

    I did not find an official i.MX RT1060 / RT1062 silicon erratum that directly breaks the ObjectFLED transmit path (QTMR4 -> XBAR1 -> DMAMUX/eDMA -> GPIO1-4). The likely failures are in our driver/resource ownership and test harness, not an NXP eDMA/XBAR data-path erratum.

    Area Verdict Notes / Action
    eDMA / DMAMUX / XBAR silicon errata No matching erratum found Treat this theory as low probability unless a newer NXP errata revision appears. Investigate driver config, ownership, and ISR timing first. NXP RT1060 errata: https://www.nxp.com/docs/en/errata/IMXRT1060CE_B.pdf
    ERR050194 QTMR overflow erratum Not applicable to current ObjectFLED use ObjectFLED uses QTMR compare output routed through XBAR and TMR_CTRL_OUTMODE(3), not QTMR overflow flags/interrupts in the erratum?s upward-count overflow case. Current ObjectFLED timer setup: https://github.com/FastLED/FastLED/blob/teensy-fix/src/third_party/object_fled/src/OjectFLED.cpp.hpp#L217-L236
    Cache / DMA coherency Worth investigating NXP AN12042 says non-driver DMA users must handle cache maintenance; cacheable DMA source buffers need clean before DMA and 32-byte alignment. ObjectFLED does use DMAMEM, aligned(32), and cache clean/invalidate calls, but we should verify Teensy?s arm_dcache_flush_delete() barriers and the MPU attributes for DMAMEM. Source: https://www.nxp.com/docs/en/application-note/AN12042.pdf
    ISR latency Worth investigating ObjectFLED refills half of bitdata from a DMA2 ISR. Audio, USB logging, disabled IRQs, flash/cache stalls, or high-priority interrupts can starve the refill without any silicon erratum. NXP ISR latency note: https://www.nxp.com/docs/en/application-note/AN12078.pdf
    Cortex-M7 write-through erratum ERR011572 Conditional only Relevant only if Teensy/FastLED/user MPU config makes the DMA buffer region write-through and cache-maintenance barriers are insufficient. Otherwise lower probability.
    SEMC/FlexSPI/PIT/SAI/LPSPI/USB/FlexCAN/BEE errata Not in the ObjectFLED TX path Keep them out of the first-line ObjectFLED investigation unless a repro involves those subsystems directly.

    Confirmed Wrong / High-Confidence Driver Bugs

    Severity Finding Evidence Required Follow-Up
    Critical Legacy Teensy 4 ObjectFLED proxy never flushes the last or only strip group. Default alias selects ObjectFLED proxy: https://github.com/FastLED/FastLED/blob/teensy-fix/src/platforms/arm/teensy/teensy4_common/clockless.h#L18. showPixels() only queues: https://github.com/FastLED/FastLED/blob/teensy-fix/src/platforms/arm/teensy/teensy4_common/clockless_objectfled.h#L201. endShowLeds() explicitly does not flush: https://github.com/FastLED/FastLED/blob/teensy-fix/src/platforms/arm/teensy/teensy4_common/clockless_objectfled.h#L212. Add a real end-frame flush path, probably ObjectFLEDRegistry::flushAll() from an end-frame hook, then test one strip and multiple timing groups.
    Critical If the legacy proxy is forced to flush, it can dereference a null ObjectFLED draw buffer. Legacy rebuild constructs ObjectFLED(..., nullptr, ...): https://github.com/FastLED/FastLED/blob/teensy-fix/src/platforms/arm/teensy/teensy4_common/clockless_objectfled.cpp.hpp#L208. show() always calls genFrameBuffer(): https://github.com/FastLED/FastLED/blob/teensy-fix/src/third_party/object_fled/src/OjectFLED.cpp.hpp#L505. genFrameBuffer() reads drawBuffer: https://github.com/FastLED/FastLED/blob/teensy-fix/src/third_party/object_fled/src/OjectFLED.cpp.hpp#L381. Either set drawBuffer = frameBufferLocal after construction or add a real raw-framebuffer path that skips genFrameBuffer().
    Critical ObjectFLED does not force selected pins back to GPIO mux mode. ObjectFLED mutates pad control and GPIO direction but does not write portConfigRegister(pin) / mux: https://github.com/FastLED/FastLED/blob/teensy-fix/src/third_party/object_fled/src/OjectFLED.cpp.hpp#L183-L188. PJRC pinMode() does write GPIO mux (`5 0x10): https://github.com/PaulStoffregen/cores/blob/master/teensy4/digital.c#L162-L188. PJRC analogWrite()` remuxes PWM pins: https://github.com/PaulStoffregen/cores/blob/master/teensy4/pwm.c#L266-L298.
    High ObjectFLED does not restore TMR4, XBAR, GPIO fast/slow routing, pad settings, DMAMUX, or DMA IRQ ownership. begin() rewrites TMR4: https://github.com/FastLED/FastLED/blob/teensy-fix/src/third_party/object_fled/src/OjectFLED.cpp.hpp#L217-L236; XBAR: https://github.com/FastLED/FastLED/blob/teensy-fix/src/third_party/object_fled/src/OjectFLED.cpp.hpp#L238-L245; GPIO route/pad: https://github.com/FastLED/FastLED/blob/teensy-fix/src/third_party/object_fled/src/OjectFLED.cpp.hpp#L183-L188. Destructor only waits and frees buffer: https://github.com/FastLED/FastLED/blob/teensy-fix/src/third_party/object_fled/src/OjectFLED.cpp.hpp#L710-L714. Treat ObjectFLED as exclusive owner while active, and either restore state on destruction or document/guard that it is not a temporary owner. Add register snapshots before/after begin() and destruction.
    High XBAR control registers are clobbered with whole-register writes. ObjectFLED assigns XBARA1_CTRL0 = ... and XBARA1_CTRL1 = ...: https://github.com/FastLED/FastLED/blob/teensy-fix/src/third_party/object_fled/src/OjectFLED.cpp.hpp#L243-L245. PJRC core exposes four XBAR DMA request outputs, including request 95: https://github.com/PaulStoffregen/cores/blob/master/teensy4/imxrt.h#L234-L235 and https://github.com/PaulStoffregen/cores/blob/master/teensy4/imxrt.h#L307-L308. Change to masked updates for the exact output bits ObjectFLED owns. Do not disturb XBAR output 3 / DMA request 95 or unrelated edge/IRQ fields.
    High GPIO6-9 to GPIO1-4 routing is global, sticky, and not restored. PJRC startup routes pads to fast GPIO6-9: https://github.com/PaulStoffregen/cores/blob/master/teensy4/startup.c#L206-L210. ObjectFLED clears IOMUXC_GPR_GPR26..29 bits to route selected pads to slow GPIO1-4: https://github.com/FastLED/FastLED/blob/teensy-fix/src/third_party/object_fled/src/OjectFLED.cpp.hpp#L186-L188. PJRC digitalWrite() uses the fast GPIO table: https://github.com/PaulStoffregen/cores/blob/master/teensy4/digital.c#L115-L140. After ObjectFLED owns a pin, normal digitalWrite/pinMode/interrupt semantics on that pin may be broken until reboot. Decide whether to restore GPR bits or make this explicit exclusive ownership.
    High DMA allocation failure can hardfault. PJRC DMAChannel::begin() sets TCD = 0 and says later use hardfaults when all 16 channels are exhausted: https://github.com/PaulStoffregen/cores/blob/master/teensy4/DMAChannel.cpp#L45-L68. ObjectFLED unconditionally dereferences dma1/2/3.TCD: https://github.com/FastLED/FastLED/blob/teensy-fix/src/third_party/object_fled/src/OjectFLED.cpp.hpp#L248-L299. Check all three DMA channels after allocation; fail cleanly and surface an AutoResearch error if any TCD is null. Add a DMA-exhaustion regression test or diagnostic build.
    High Channel engine reports READY while ObjectFLED DMA/latch is still active. Channel engine says ObjectFLED show is synchronous and poll() always returns ready: https://github.com/FastLED/FastLED/blob/teensy-fix/src/platforms/arm/teensy/teensy4_common/drivers/objectfled/channel_engine_objectfled.cpp.hpp#L242-L245. ObjectFLED starts timers and releases ownership immediately: https://github.com/FastLED/FastLED/blob/teensy-fix/src/third_party/object_fled/src/OjectFLED.cpp.hpp#L568-L572. Expose real busy/drain state through IObjectFLEDInstance / ChannelEngineObjectFLED::poll(). Wait for DMA plus latch before reporting ready or starting another timing group.
    High Legacy RGBW proxy can overflow ObjectFLED framebuffer because it mixes padded RGB storage with RGBW byte counts. RectangularDrawBuffer uses Rgbw::size_as_rgb() padded sizing: https://github.com/FastLED/FastLED/blob/teensy-fix/src/fl/gfx/rectangular_draw_buffer.cpp.hpp#L10 and https://github.com/FastLED/FastLED/blob/teensy-fix/src/fl/gfx/rgbw.h#L186. Legacy ObjectFLED derives LED count from total_bytes / 4 then clears/copies total_bytes: https://github.com/FastLED/FastLED/blob/teensy-fix/src/platforms/arm/teensy/teensy4_common/clockless_objectfled.cpp.hpp#L168-L223. Add ASan/unit coverage for 1, 2, 3, and 4 RGBW LEDs through the legacy proxy. Allocate/copy based on ObjectFLED?s actual buffer size, not padded RGB bytes.
    High Raw RGBW channel data is corrupted even when detected as RGBW. Real wrapper sets drawBuffer = frameBufferLocal: https://github.com/FastLED/FastLED/blob/teensy-fix/src/platforms/arm/teensy/teensy4_common/drivers/objectfled/objectfled_peripheral_real.cpp.hpp#L84-L89. ObjectFLED CORDER_RGBW treats source as 3-byte RGB and derives W: https://github.com/FastLED/FastLED/blob/teensy-fix/src/third_party/object_fled/src/OjectFLED.cpp.hpp#L335-L344. Do not feed already encoded 4-byte RGBW through CORDER_RGBW. Add raw RGB/RGBW passthrough or bypass genFrameBuffer() for channel-engine encoded data.
    Medium Scatter/gather DMASetting visibility is risky. dma2next is a normal DMASetting member: https://github.com/FastLED/FastLED/blob/teensy-fix/src/third_party/object_fled/src/ObjectFLEDDmaManager.h#L35-L38. ISR mutates it for scatter/gather: https://github.com/FastLED/FastLED/blob/teensy-fix/src/third_party/object_fled/src/OjectFLED.cpp.hpp#L609-L618. Verify the DMASetting TCD storage is DMA-visible and cache-coherent on Teensy 4.x. If not, put it in DMA-safe memory and flush/barrier before ESG follows it.

    PJRC Core / Library Conflict Surface

    Conflict Why It Matters
    OctoWS2811 ObjectFLED is based on the same Teensy 4.x mechanism: QTimer4, XBAR1 DMA request outputs, three DMA channels, GPIO fast-to-slow routing. It cannot safely coexist with PJRC OctoWS2811 without explicit ownership. Source: https://www.pjrc.com/teensy/td_libs_OctoWS2811.html and https://github.com/PaulStoffregen/OctoWS2811/blob/master/OctoWS2811_imxrt.cpp
    PWM / analogWrite() Pins 8, 9, and 22 are PWM-capable. analogWrite() remuxes those pins to PWM; ObjectFLED currently does not reclaim GPIO mux. PJRC PWM docs: https://www.pjrc.com/teensy/td_pulse.html
    WS2812Serial Does not share TMR4/XBAR, but shares pins and DMA. Pin 8 is a main trap because WS2812Serial uses Serial2 TX-style muxing. Source: https://github.com/PaulStoffregen/WS2812Serial/blob/master/readme.md#L26-L37
    FlexIO_t4 / FlexIO users FastLED?s local FlexIO driver hardcodes FlexIO2 resources and does not use PJRC FlexIO_t4?s resource manager. This can conflict with FlexIO_t4/FlexSerial/FlexIOSPI. Source: https://github.com/PaulStoffregen/FlexIO_t4/blob/master/README.md#L117-L119

    Pin-Specific Notes For Current Loopback Pins

    Pin Notes
    8 GPIO7 bit 16, PWM-capable (FlexPWM1_3_A), FlexIO2-capable, WS2812Serial Serial2 TX conflict surface. High-risk if any previous peripheral touched it.
    9 GPIO7 bit 11, PWM-capable (FlexPWM2_2_B), FlexIO2-capable. Validation does not currently warn about this conflict class.
    22 GPIO6 bit 24, PWM-capable (FlexPWM4_0_A), analog-capable, FlexIO3 only. FlexIO3 is not equivalent to FlexIO2 for DMA LED output.

    AutoResearch / Wrapper Cheating Paths Found In Second Pass

    Severity Finding Evidence / Action
    Critical Malformed Teensy test RPC responses can be treated as PASS because schema validation is skipped and generic OK handling leaks into final result. Teensy schema validation is skipped in ci/autoresearch/phases.py; non-dict responses only warn, and dict responses not explicitly failing can set stop_word_found = "OK". Require success, passed, totalTests > 0, passedTests, selected driver, requested/actual pins, and capture metadata for runSingleTest / runParallelTest.
    High Host and firmware pin defaults still diverge. Host defaults TX/RX 1/0; Teensy firmware default RX is 2. Always send setPins for final effective pins and return actual pins in every test result.
    High Firmware result omits actual pins and capture backend. runSingleTest chooses pins internally but does not serialize pinTx, pinRx, active driver, or RX backend. It also hard-codes RxDeviceType::RMT in a Teensy path. Add these fields to every result and fail if absent.
    High Capture diagnostics exist but are not wired into passing evidence. capturedBytes, captureWaitResult, and rawEdgesAfterWait exist but are not populated through the capture path. Passing tests skip pattern details. Acceptance needs minimal positive capture evidence, not just absence of failure.
    High Raw serial diagnostic scripts provide a parallel acceptance path outside bash autoresearch. ci/autoresearch/test_flexio_rx_objectfled.py opens serial directly and prints PASS. Docs also endorse ad hoc pyserial RPCs. Keep these only as diagnostics with a non-acceptance banner; bash autoresearch ... is the only acceptance path.
    High Stale .pio firmware can be uploaded before canonical build/deploy. The pre-build port recovery path can upload .pio/build/<env>/firmware.hex. Remove this or force it to use the freshly built fbuild artifact inside the normal AutoResearch deploy phase.
    Medium --spi on Teensy may use the wrong driver name. AutoResearch requests SPI; Teensy registers SPI_UNIFIED. Map flags to actual Teensy driver names after board detection.
    Medium --use-root-platformio-ini remains an escape hatch. For Teensy bring-up, root PlatformIO should not mask staged/fbuild AutoResearch behavior. Hard-fail or disable this path for #3353 acceptance.

    Highest-Value Diagnostics To Add Next

    1. Add register snapshots before/after ObjectFLED begin(), show(), and destruction: IOMUXC_GPR_GPR26..29, selected pin mux/pad registers, TMR4_*, XBARA1_SEL/CTRL, DMAMUX_CHCFG, DMA_ERQ/ERR/ES/HRS, and DMA channel TCD state.
    2. Add a mux-reclaim repro: call analogWrite(8, 128), then run ObjectFLED on pin 8 and confirm whether wire output appears. Repeat for 9 and 22.
    3. Add a DMA exhaustion / allocation guard test so ObjectFLED reports failure instead of dereferencing null TCD.
    4. Add legacy proxy tests for single-strip flush, forced flush null-draw-buffer, and RGBW 1/2/3/4 LED padded-size cases.
    5. Add channel-engine RGBW tests for 3, 6, and 9 RGBW pixels and a raw RGBW passthrough corruption test.
    6. Add AutoResearch result hardening: no PASS without explicit test result schema, actual pins, selected driver, capture backend, and nonzero capture evidence.

    Electrical Note

    Even after software is fixed, a Teensy 4.x 3.3V data signal can fail with 5V WS2812B/NeoPixel strips. PJRC recommends fast 74HCT/AHCT-style level shifting for reliable LED signaling, especially with real strips and longer wiring. Sources: https://www.pjrc.com/teensy/td_libs_OctoWS2811.html and https://github.com/PaulStoffregen/WS2812Serial/blob/master/readme.md#L50-L70

  6. changed the title [-][meta] Comprehensive Teensy LED driver bring-up through AutoResearch[/-] [+][research] Teensy LED driver bring-up research log[/+] on Jun 24, 2026
  7. zackees commented on Jun 27, 2026

    @zackees
    MemberAuthor

    Closing as research log -- core bring-up phase is complete:

    Async streaming follow-ups (#3181, #3182, #3183), declarative-capabilities refactor (#3186), and parallel-SPI features (#3175, #3176) are deferred. The 52-finding FlexIO/ObjectFLED/FlexPWM RX audit (#3416) is the remaining open meta for forward-looking risks but doesn't block any current driver in production.

    If a fresh bring-up cycle starts, file a new research-log meta rather than reopening this one.

  8. moved this from Triage to Done in FastLED Trackeron Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions