8-DK / ESP32_SPI_WS2812_idf

flicker free ws2812 driver for esp32. This driver use SPI peripheral and dma buffer to transfer bit data for ws2812 led.
20 stars 8 forks source link

Fix DMA buffer size #1

Open damien-otis opened 3 years ago

damien-otis commented 3 years ago

The calculation of DMA buffer size is wrong, it should be this:

define LED_DMA_BUFFER_SIZE ((LED_MAX_NBER_LEDS sizeof(uint16_t) (24/4)))+1

The current code uses 16 bytes instead of 2 bytes, making the DMA buffer quite large which slows down the refresh rate of the LEDs by a lot.

LeonardoZambonelliAxel commented 2 years ago

If i have a 100led strip, how much should be the buffer size? What is 24/4 stand for? I'm using a SK6812, should it work?