Skip to content

Strange garbled output on ESP32 with parallel output #935

Closed

Description

@elliottkember

I'm getting some bizarre characters on my ESP32 when using FastLED to drive parallel WS2812B strips. This only happens if I try to output to more than about 5 or 6 LED strips in parallel - sometimes it works with 6, sometimes it doesn't, but drive more than 6 and it always crashes. Everything's fine with fewer than 6 output pins.

I've tried changing the baud to read this logging, but nothing seems to work. I've also tried changing the Xtal frequency, the core my code runs on, adjusting the heap size, I've tried whatever I can. I think if I can read this logging, I might be able to get some more context on what's going on. The fact that it doesn't reboot leads me to believe it's not a crash but something like a memory corruption.

I thought it might be related to the pins I've chosen, but different combinations also fail. This code's worked fine before on a Teensy board, so I suspect something is up.

This happens when I call FastLED.show() in my render loop.

image

Anybody seen this before?

Expected Behavior

I'd love to be able to output pixel data to lots of pins in parallel!

Code to reproduce this issue

I'm currently driving 6 strips, 2 0 4 18 21 and 19. Adding any other line makes it error out.

// Working fine
FastLED.addLeds<WS2812B, 2, GRB>(leds[0], LED_ROWS);
FastLED.addLeds<WS2812B, 0, GRB>(leds[1], LED_ROWS);
FastLED.addLeds<WS2812B, 4, GRB>(leds[2], LED_ROWS);
FastLED.addLeds<WS2812B, 18, GRB>(leds[3], LED_ROWS);

// Outer rows work fine, adding the centre rows fails
FastLED.addLeds<WS2812B, 21, GRB>(leds[5], LED_ROWS); // 2,1
// FastLED.addLeds<WS2812B, 22, GRB>(leds[6], LED_ROWS);
// FastLED.addLeds<WS2812B, 23, GRB>(leds[7], LED_ROWS);
FastLED.addLeds<WS2812B, 19, GRB>(leds[4], LED_ROWS); // 3,1

// FastLED.addLeds<WS2812B, 12, GRB>(leds[8], LED_ROWS);
// FastLED.addLeds<WS2812B, 14, GRB>(leds[9], LED_ROWS);
// FastLED.addLeds<WS2812B, 27, GRB>(leds[10], LED_ROWS);
// FastLED.addLeds<WS2812B, 26, GRB>(leds[11], LED_ROWS);

Activity

  1. elliottkember commented on Dec 9, 2019

    @elliottkember
    ContributorAuthor

    If anybody sees this:

    #define FASTLED_ESP32_I2S true

    After a whole day of looking things up, this line fixed everything for me! Big shout-out to Yves and Sam for making this work.

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