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
Hello, is there any progress on supporting Hardware SPI on ESP32 at least for APA102 strips?
The bitbanging works without any problem, but it is unfortunatelly slow for POV effects.
I tried the NeoPixelBus with HW SPI and it works flawlessly. However I really love FastLED's API and would like to stick with this.
Can this be implemented in the near future? I would like to help, unfortunately, this low-level C is a mystery for me.
@RobinB I used the official example with this method: NeoPixelBus<DotStarBgrFeature, DotStarSpiMethod> strip(128);
The only change I did is in DotStarSpiMethod, the Initialize(), I hardcoded the pins I want to use to SPI.begin(SCK, MISO, MOSI, SS). - MISO/SS can be random pins, they are not used. See bellow.
void Initialize()
{
SPI.begin(27,14,26,12);
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
SPI.setFrequency(20000000L);
#elif defined(ARDUINO_ARCH_AVR)
SPI.setClockDivider(SPI_CLOCK_DIV2); // 8 MHz (6 MHz on Pro Trinket 3V)
#else
SPI.setClockDivider((F_CPU + 4000000L) / 8000000L); // 8-ish MHz on Due
#endif
SPI.setBitOrder(MSBFIRST);
SPI.setDataMode(SPI_MODE0);
}
I am Clud, an AI agent working on behalf of Zach Vorhies.
This is fixed in current master. The resolving change is #1047, which merged into master and added the ESP32 hardware SPI driver for clocked LEDs including APA102/SK9822, with VSPI/HSPI bus selection through FASTLED_ESP32_SPI_BUS. Current master still carries the ESP32 hardware SPI path in src/platforms/esp/32/core/fastspi_esp32.h and src/platforms/esp/32/core/fastspi_esp32_arduino.h; ESP32 hardware SPI is now enabled by default and FASTLED_ALL_PINS_HARDWARE_SPI is deprecated.
If ESP32 hardware SPI is still reproducibly failing on current master, please open a fresh focused issue with the board, pins, LED chipset, FastLED version/commit, and a minimal sketch.
Activity
RobinB commentedon Dec 12, 2018
I'm in the same situation, hoping for Hardware SPI with the ESP32, ideally selectable between the different SPI ports (HSPI and VSPI).
@Hokyjack: Could you post your Neopixel code for the hardware spi? Which pins are you using? The library example won't work for me...
Hokyjack commentedon Dec 12, 2018
@RobinB I used the official example with this method:
NeoPixelBus<DotStarBgrFeature, DotStarSpiMethod> strip(128);The only change I did is in DotStarSpiMethod, the Initialize(), I hardcoded the pins I want to use to SPI.begin(SCK, MISO, MOSI, SS). - MISO/SS can be random pins, they are not used. See bellow.
PhilColbert commentedon Oct 30, 2019
Any news on this, sounds a good thing to have :)
skandragon commentedon Nov 1, 2019
This would be amazingly handy for this upcoming holiday.
ntwallace commentedon Jul 1, 2020
Just submitted this in #1047, try it out
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 is #1047, which merged intomasterand added the ESP32 hardware SPI driver for clocked LEDs including APA102/SK9822, with VSPI/HSPI bus selection throughFASTLED_ESP32_SPI_BUS. Currentmasterstill carries the ESP32 hardware SPI path insrc/platforms/esp/32/core/fastspi_esp32.handsrc/platforms/esp/32/core/fastspi_esp32_arduino.h; ESP32 hardware SPI is now enabled by default andFASTLED_ALL_PINS_HARDWARE_SPIis deprecated.If ESP32 hardware SPI is still reproducibly failing on current
master, please open a fresh focused issue with the board, pins, LED chipset, FastLED version/commit, and a minimal sketch.