Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32 SPI DMA Support #340

Open
Kyklas opened this issue Dec 2, 2022 · 1 comment
Open

ESP32 SPI DMA Support #340

Kyklas opened this issue Dec 2, 2022 · 1 comment

Comments

@Kyklas
Copy link

Kyklas commented Dec 2, 2022

I have worked with WS2812B on ESP32.
Implementation I have seen make use of the RMT module on ESP32.
When controlling strip with many pixel, I have seen glitches. Perhaps similar with #139 or FastLED/FastLED#719
I have analyzed the wave form generation with Saleae Logic and I have concluded that timing cannot be guaranteed.
Event with half RMT block, the interrupt is not guaranteed to be processed.

My approach was to use DMA and the SPI controller. The DMA guarantees no glitches and free the CPU at the cost of memory usage.
The ESP32 does benefits form a decent amount of RAM.

I have been using this approach in another library : https://github.com/Kyklas/SmartLeds/blob/esp-idf_hass-light/src/SmartLeds.h#L442

Would Adafuit_NeoPixel consider integrating support for DMA SPI control of neopixel and alike LEDs ?

@PaintYourDragon
Copy link
Contributor

Please update to latest NeoPixel library (currently 1.10.7). RMT has been used on all ESP32 variants for a while now, can confirm zero flicker w/300 pixels on ESP32, S2 and S3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants