Repository navigation
Closed
Labels
Description
Board / MCU
ESP8266
LED Chipset
Other
FastLED Version
3.10.5
Arduino / PlatformIO version
3.1.2
Operating System
Windows
Description
Sketch shall work with actual FastLED library in order to avoid change of pins used in old projects.
Steps to reproduce
ESP8266: FastLED 3.10.5 watchdog reset in addLeds() when GPIO12 (D6) is used with P9813
Environment
- Board: ESP8266 NodeMCU
- LED chipset: P9813 (crashes also without P9813 connected)
- Software SPI (custom DATA/CLOCK pins)
- FastLED 3.9.12: works
- FastLED 3.10.5: watchdog reset
- ESP8266 Arduino Core-Version: 3.1.2
- Boarddefinition: NodeMCU 0.9 (ESP-12 module)
Problem
The sketch crashes inside
FastLED.addLeds<P9813, DATA_PIN, CLOCK_PIN, RGB>(leds, 1);The function never returns.
Serial output after the call is never executed.
Minimal sketch
#include <Arduino.h>
#include <FastLED.h>
#define DATA_PIN D6
#define CLOCK_PIN D7
#define NUM_LEDS 1
CRGB leds[NUM_LEDS];
void setup() {
Serial.begin(115200);
delay(2000);
Serial.println("A");
FastLED.addLeds<P9813, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
Serial.println("B");
}
void loop() {
}Output:
A
ets Jan 8 2013,rst cause:4, boot mode:(3,6)
wdt reset
...
Serial.println("B") is never reached.
Tested combinations
FastLED 3.9.12
| DATA | CLOCK | Result |
|---|---|---|
| D5 | D6 | OK |
| D6 | D7 | OK |
| D7 | D8 | OK |
| D5 | D7 | OK |
FastLED 3.10.5
| DATA | CLOCK | Result |
|---|---|---|
| D5 | D6 | WDT reset |
| D6 | D7 | WDT reset |
| D7 | D8 | OK |
| D5 | D7 | OK |
The problem occurs whenever GPIO12 (D6) is used, regardless of whether it is configured as DATA or CLOCK.
Additional observations
- RGB/BGR makes no difference.
- Swapping DATA/CLOCK makes no difference.
FASTLED_FORCE_SOFTWARE_SPImakes no difference.- The watchdog reset occurs inside
FastLED.addLeds(). - The same hardware works correctly with FastLED 3.9.12.
This looks like a regression introduced between FastLED 3.9.12 and 3.10.5.
Minimal sketch
#include <Arduino.h>
#include <FastLED.h>
#define DATA_PIN D6 // GPIO12
#define CLOCK_PIN D7 // GPIO13
#define NUM_LEDS 1
CRGB leds[NUM_LEDS];
void setup() {
Serial.begin(115200);
delay(2000);
Serial.println();
Serial.println("A");
FastLED.addLeds<P9813, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
Serial.println("B");
leds[0] = CRGB::Red;
FastLED.show();
Serial.println("C");
}
void loop() {
Serial.println("D");
delay(1000);
}Serial / debug output
A
ets Jan 8 2013,rst cause:4, boot mode:(3,6)
wdt reset
load 0x4010f000, len 3424, room 16
tail 0
chksum 0x2e
load 0x3fff20b8, len 40, room 8
tail 0
chksum 0x2b
csum 0x2b
v00042e00
~ld
������o�s��g|�l�l`��c�����|�s��l�g��o��d`���s�l�l����
AChecklist
- I have searched existing issues for duplicates
- I have tested with the latest FastLED release or git master
- I can reproduce this with a minimal sketch
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(esp8266): stop shadowing vendor IO_MUX macros — GPIO12 hung addLe…