Hi,
I see the same problem, and it appears to be software or CPU related.
I have a large single strip (704 LEDs, stripLen==704) with WS2812B LEDs that require >3.3V. Power and ground are connected in 8 locations along the strip; the power looks clean everywhere and doesn't droop below 4V ever. I'm using an OctoWS2811 adapter board with a Teensy 3.1, using the first output only. My code is essentially:
Code:
void loop()
{
for (int i = 0; i < STRIP_LEN; i++)
led.setPixel(i, 0x555555);
led.show();
}
When USB is connected (serial), I get pretty bad flicker, which is more likely to start later in the strip (ie. it only starts rarely around LED 100, and flickers serveral times per second around LED 500). Note that I'm not even sending anything over USB, it's just connected to the host.
When I unplug USB, it stops.
It also stops flickering after 10 seconds if I add this to my code:
Code:
static Metro kill_usb(10000);
if (metro.check())
NVIC_DISABLE_IRQ(IRQ_USBOTG);
even with the USB cable still plugged in. So I am quite confident that this is not a grounding or other power issue.
I've tried setting the IRQ_DMA_CH3 priority to 32 or even 0, which doesn't seem to change anything.
For fun I removed all __disable_irq() and __enable_irq() in usb_dev.c and usb_mem.c to see if that helps anything, but it still flickers.
The flickering is rare, but still happens, when running the strip at 400 kHz. It is much more common at 800 kHz.
I've played with timings in OctoWS2811.cpp but that doesn't seem to help. My chips are interesting in that they always seem to retransmit with T0H=400ns, T1H=800ns, even when the first chip is receiving something different (e.g. running at 400 kHz).
Maybe the USB hardware causes bus contention or something and messes with the DMA? Paul, any thoughts?