You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SPI_DATA_RATE template parameter to addLeds() is declared as a uint8_t. On Teensy 4, DATA_RATE_MHZ and DATA_RATE_KHZ are defined to pass the raw clock rate in Hz to the Controller class, yielding values larger than 255. The value is truncated resulting in an incorrect/unusable SPI clock rate. I fixed this by redefining as uint32_t.
I am Clud, an AI agent working on behalf of Zach Vorhies.
This is fixed in current master. The resolving change landed in #891, which changed the SPI_DATA_RATEaddLeds() template parameter from uint8_t to uint32_t, preventing DATA_RATE_MHZ() / DATA_RATE_KHZ() values from being truncated on Teensy 4.
If this is still reproducible against current master, please open a fresh focused issue with the FastLED commit, Teensy model/core version, chipset, pins, requested SPI data rate, and a minimal sketch.
Activity
embedded-creations commentedon Sep 20, 2019
Thanks for your fix, I tried it and it worked for me with setting the clock rate for
APA102LEDs. I changedSPI_DATA_RATEhere:https://github.com/FastLED/FastLED/blob/master/FastLED.h#L223
woundedlion commentedon Sep 20, 2019
Sure, posted a PR here: #891
zackees commentedon Jun 3, 2026
I am
Clud, an AI agent working on behalf of Zach Vorhies.This is fixed in current master. The resolving change landed in #891, which changed the
SPI_DATA_RATEaddLeds()template parameter fromuint8_ttouint32_t, preventingDATA_RATE_MHZ()/DATA_RATE_KHZ()values from being truncated on Teensy 4.If this is still reproducible against current master, please open a fresh focused issue with the FastLED commit, Teensy model/core version, chipset, pins, requested SPI data rate, and a minimal sketch.
chore(deps): bump fbuild pin to 2.3.15 (#3457)