Skip to content

ESP32 SPI problems  #923

Closed
Closed

Description

@nikolindima

Add FastLED lib to my project and Adafruit_PN532 nfc module not working

Get this message.
/Documents/Arduino/libraries/FastLED/fastspi.h:130:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"

How i can fix it? i don't use SPI with FastLED.

I use
#include <FastLED.h>
#define NUM_LEDS 18
#define DATA_PIN 22
CRGBArray<NUM_LEDS> leds;

void setup() {
{
FastLED.addLeds<WS2813, DATA_PIN, RGB>(leds, NUM_LEDS);
}

Activity

  1. Ic-ks commented on Feb 3, 2020

    @Ic-ks

    Why is this issue closed without any comment? I also get this warning on a new esp32 (https://www.ebay.com/itm/ESP32-Dev-Board-NodeMCU-WROOM32-WiFi-WLAN-Bluetooth-Development/254138283456) with the latest FastLED version (3.3.3)
    And this board provides multiple SPI pins (https://lastminuteengineers.com/wp-content/uploads/arduino/ESP32-Development-Board-Pinout.png). I tested following pins: 13,12,14,15,2,4,5,18,19,21,22,23 as DATA_PIN

    In file included from src/main.cpp:3:0:
    /home/x/.platformio/lib/FastLED_ID126/FastLED.h:14:21: note: #pragma message: FastLED version 3.003.003
     #    pragma message "FastLED version 3.003.003"
                         ^
    In file included from /home/x/.platformio/lib/FastLED_ID126/FastLED.h:65:0,
                     from src/main.cpp:3:
    /home/x/.platformio/lib/FastLED_ID126/fastspi.h:130:23: note: #pragma message: No hardware SPI pins defined.  All SPI access will default to bitbanged output
     #      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"
                           ^
    In file included from /home/x/.platformio/lib/FastLED_ID126/platforms/esp/32/fastled_esp32.h:8:0,
                     from /home/x/.platformio/lib/FastLED_ID126/platforms.h:36,
                     from /home/x/.platformio/lib/FastLED_ID126/FastLED.h:52,
                     from src/main.cpp:3:
    /home/x/.platformio/lib/FastLED_ID126/platforms/esp/32/clockless_rmt_esp32.h: In instantiation of 'void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::fillNext() [with int DATA_PIN = 5; int T1 = 60; int T2 = 150; int T3 = 90; EOrder RGB_ORDER = (EOrder)66u; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 5]':
    /home/x/.platformio/lib/FastLED_ID126/platforms/esp/32/clockless_rmt_esp32.h:494:21:   required from 'static void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::interruptHandler(void*) [with int DATA_PIN = 5; int T1 = 60; int T2 = 150; int T3 = 90; EOrder RGB_ORDER = (EOrder)66u; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 5]'
    /home/x/.platformio/lib/FastLED_ID126/platforms/esp/32/clockless_rmt_esp32.h:280:31:   required from 'void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::initRMT() [with int DATA_PIN = 5; int T1 = 60; int T2 = 150; int T3 = 90; EOrder RGB_ORDER = (EOrder)66u; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 5]'
    /home/x/.platformio/lib/FastLED_ID126/platforms/esp/32/clockless_rmt_esp32.h:294:24:   required from 'void ClocklessController<DATA_PIN, T1, T2, T3, RGB_ORDER, XTRA0, FLIP, WAIT_TIME>::showPixels(PixelController<RGB_ORDER>&) [with int DATA_PIN = 5; int T1 = 60; int T2 = 150; int T3 = 90; EOrder RGB_ORDER = (EOrder)66u; int XTRA0 = 0; bool FLIP = false; int WAIT_TIME = 5]'
    src/main.cpp:27:1:   required from here
    /home/x/.platformio/lib/FastLED_ID126/platforms/esp/32/clockless_rmt_esp32.h:511:22: warning: unused variable 't1' [-Wunused-variable]
                 uint32_t t1 = __clock_cycles();
    
  2. kriegsman commented on Feb 4, 2020

    @kriegsman
    Member

    Thanks for checking in about this. That message isn’t an error- just a notice. We should change it or remove it.

  3. Ic-ks commented on Feb 4, 2020

    @Ic-ks

    But using the SPI output would be less computation intensive, right? And this would result in less power consumption. What is the reason that the esp32 cannot run with the SPI output strategy?

  4. kriegsman commented on Feb 5, 2020

    @kriegsman
    Member

    The FastLED code for ESP32 uses the ESP32's dedicated "RMT" hardware unit to output the data signal, instead of the "SPI" hardware as is used on (e.g.) AVR microcontrollers. But FastLED on ESP32 doesn't actually 'manually bitbang' the data out using just software. So I think that since we are already using a hardware-assisted data output channel, we should probably just eliminate this message when that's the case.

  5. Ic-ks commented on Feb 6, 2020

    @Ic-ks

    Thank you for the detailed explanation 👍

  6. bbulkow commented on Sep 15, 2020

    @bbulkow
    Contributor

    The warning actually states that SPI led strings - like the APA102 - will default to bitbanging. The RMT hardware can't be used for SPI leds, because it requires two wires of synchronization.

  7. added a commit that references this issue on Jul 2, 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

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions