Skip to content

ws2812: support the Teensy 3.6 - #933

Merged
deadprogram merged 1 commit into
tinygo-org:devfrom
davecheney:ws2812-teensy36
Oct 27, 2026
Merged

deadprogram merged 1 commit into
tinygo-org:devfrom
davecheney:ws2812-teensy36

Conversation

@davecheney

Copy link
Copy Markdown
Contributor

Generate Cortex-M timing for 180 MHz, and add a Teensy 3.6 pin to the example. The MK66F18 has no Pin.PortMaskSet, so on that chip the driver writes the bit-band aliases from Pin.Fast() instead. Other Cortex-M chips still use PortMaskSet, and their code size does not change.

Measured on a Teensy 3.6 driving 10 WS2813 LEDs: T0H 350 to 360 ns and T1H 1050 to 1060 ns.

@deadprogram

Copy link
Copy Markdown
Member

Thanks, this looks good. Could you add a smoketest line so CI builds the mk66f18 path?

tinygo build -size short -o ./build/test.hex -target=teensy36 ./examples/ws2812

Generate Cortex-M timing for 180 MHz, and add a Teensy 3.6 pin to the
example. The MK66F18 has no Pin.PortMaskSet, so on that chip the driver
writes the bit-band aliases from Pin.Fast() instead. Other Cortex-M
chips still use PortMaskSet, and their code size does not change.

Measured on a Teensy 3.6 driving 10 WS2813 LEDs: T0H 350 to 360 ns and
T1H 1050 to 1060 ns.
@davecheney

Copy link
Copy Markdown
Contributor Author

@deadprogram PTAL

@deadprogram deadprogram left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @davecheney now merging.

@deadprogram
deadprogram merged commit 774eb69 into tinygo-org:dev Oct 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants