Skip to content

ESP32 + Hardware SPI #686

Closed
Closed

Description

@Hokyjack

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.

Thanks!

Activity

  1. RobinB commented on Dec 12, 2018

    @RobinB

    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...

  2. Hokyjack commented on Dec 12, 2018

    @Hokyjack
    Author

    @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);
        }
    
  3. PhilColbert commented on Oct 30, 2019

    @PhilColbert

    Any news on this, sounds a good thing to have :)

  4. skandragon commented on Nov 1, 2019

    @skandragon

    This would be amazingly handy for this upcoming holiday.

  5. ntwallace commented on Jul 1, 2020

    @ntwallace

    Just submitted this in #1047, try it out

  6. added
    platform: esp32
    area: drivers
    status: stale
    status: triage
    on Apr 16, 2026
  7. zackees commented on Jun 3, 2026

    @zackees
    Member

    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.

  8. moved this from Triage to Done in FastLED Trackeron Jun 3, 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

    area: driversplatform: esp32status: stalestatus: triage

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions