Meadow F7 WS2812B LED Driver

Did I understand right: it is impossible to make a driver for WS2812B LED with current Meadow timing? Now the min time (v 3.10) of the GPIO impulse is approximately 430us (In the docs for v3.6 it is 4ms). But WS2812B is required less than 1us.


Currently that’s correct - I just spent a couple hours trying to make certain.

TL;DR; It won’t work with the current Meadow software

The problem is that the “inter bit gap” in the comms for a 2812 has a maximum of 6us. You can easily stay inside that using a SPI bus MOSI pin, with the bus in Mode 1 (normally low MOSI) but only for 16 bits and only if you set the SPI word length to 16. The 2812 needs 24 bits per pixel. Once you exceed the 6us low the chips assume it’s a reset.
The time between writes from the meadow exceeds this right now due to our execution speed, so while you can get it to send 2 bytes that meet the timing requirements, you need 3 for a single pixel. So you can’t even get it to to a 1-pixel string.

There are 3 possible paths forward to get it working for meadow 1. Implement AOT and see if the timing gets good enough to meet the requirements. Might be able to just bit-bang it then. Interrupts, GC, etc might cause issues though, so that would require some testing. 2. Implement DMA to SPI so you could just give the bus a full buffer of bits and have it send those. 3. Write a native driver specifically for these lights.

#1 is in process. #2 is generally a post v1 feature - we’ll probably look at DMA for a few things, so this would fall into that bucket. #3 I don’t think we have any current plan for. It’s technically feasible, but we have a lot of other higher priority things we’d want to do first, so this would be a post v1 thing at the earliest.

Interesting you don’t feel you need RGB strip support ASAP. I’m certain it would greatly enhance the reach of your F7 device.

I thought about getting a 32x8 led matrix and trying to make it work, but I see that it might be a problem.

Are there any lets strips or matrices that are possible to work with using Meadow, something like this one?