Repository navigation
Description
Board / MCU
ESP32-S3 (ESP32-S3-DevKitC-1-N8 class module, 8 MB flash, no PSRAM)
LED Chipset
WS2812B, one strip of 12 LEDs on one pin
FastLED Version
3.10.9 (PlatformIO registry). The relevant code is unchanged on current master (channel_driver_rmt.cpp.hpp, see below).
Arduino / PlatformIO version
PlatformIO, pioarduino platform-espressif32 55.03.39: Arduino core 3.3.9 + ESP-IDF 5.5.4 (framework = arduino, espidf)
Operating System
macOS (build host)
Description
Upgrading from 3.10.3 to 3.10.9 costs our firmware about 7.7 KB of internal heap for a 12-LED strip (36 bytes of pixel data). On a board without PSRAM that is significant: the lowest free heap during our boot fell from about 60.7 KB to 51.4 KB, with no other change.
Measured with heap_caps_get_free_size(MALLOC_CAP_8BIT) around the FastLED calls:
| Step | Free heap change | Allocated blocks |
|---|---|---|
FastLED.addLeds<WS2812B, PIN, RGB>(leds, 12) |
-2.4 KB | +7 |
first FastLED.show() |
-5.3 KB | +25 |
No extra FreeRTOS task is created.
Most of the show() cost is the RMT DMA buffer. In ChannelDriverRmt (src/platforms/esp/32/drivers/rmt/rmt_5/channel_driver_rmt.cpp.hpp, about lines 774-836 in 3.10.9 and master), the first TX channel on the S3 always tries DMA when memMgr.isDMAAvailable() is true, with a fixed dma_mem_block_symbols = 1024. That is a 4 KB DMA-capable internal-RAM buffer whatever the strip length. For a short strip the non-DMA path (on-chip RMT memory, double buffer) would be enough and needs no heap.
There is no way to opt out:
FASTLED_RMT5_DMA_SUPPORTEDfollowsSOC_RMT_SUPPORT_DMAand can't be overridden.- There is no build flag or
FastLED.set...()setting for RMT DMA. -DFASTLED_RMT5=0is rejected on IDF 5 (fix(esp32): repair or reject legacy RMT4 selection on IDF 5 #3936).
Request: a way to keep the RMT5 driver off DMA, for example:
- a build flag such as
FASTLED_RMT5_USE_DMA=0, or aCFastLEDsetting; or - use DMA only when the encoded strip doesn't fit the on-chip RMT memory; or
- size the DMA block to the data instead of always 1024 symbols.
The remaining ~3.7 KB (driver registry / channel manager / buffer pool) would also be worth a look for memory-constrained boards, but the DMA buffer is the main part.
Steps to reproduce
- ESP32-S3 without PSRAM, ESP-IDF 5.x, FastLED 3.10.9.
FastLED.addLeds<WS2812B, PIN, RGB>(leds, 12);thenFastLED.show();- Log
heap_caps_get_free_size(MALLOC_CAP_8BIT)beforeaddLeds, afteraddLeds, and after the firstshow(). Compare with 3.10.3.
Minimal sketch
#include <FastLED.h>
#include <esp_heap_caps.h>
#define PIN 5
CRGB leds[12];
static void probe(const char* where) {
Serial.printf("%s: free %u\n", where, (unsigned)heap_caps_get_free_size(MALLOC_CAP_8BIT));
}
void setup() {
Serial.begin(115200);
delay(1000);
probe("before addLeds");
FastLED.addLeds<WS2812B, PIN, RGB>(leds, 12);
probe("after addLeds");
fill_solid(leds, 12, CRGB::Red);
FastLED.show();
probe("after first show");
}
void loop() {}(The numbers above come from our firmware, which makes the same calls; I haven't run this standalone sketch.)
Serial / debug output
From our firmware's heap probes (free / lowest since boot / largest free block / allocated blocks):
TEMP fastled: before begin free 234104 min 229576 largest 172032 blk 91
TEMP fastled: after begin free 231652 min 227124 largest 172032 blk 98
TEMP fastled: after flash free 226328 min 221800 largest 172032 blk 123
("begin" = addLeds, "flash" = fill + show() + clear + show().)
Checklist
- I have searched existing issues for duplicates
- I have tested with the latest FastLED release or git master
- I can reproduce this with a minimal sketch
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Nov 8, 2026
PR #5166 adds a build flag,
-DFL_RMT5_USE_DMA=0. With it, every RMT TX channel stays on on-chip RMT memory and never allocates the 1024-symbol DMA block. The default is unchanged. Still open here:zackees commentedon Nov 9, 2026
Second follow-up on this one: #5227 / #5228. The driver no longer takes the DMA channel automatically for short strips — if the encoded frame fits inside the DMA block (about 42 WS2812 RGB LEDs) it stays on the double-buffered on-chip RMT path, so a 12-LED strip no longer pays the 4 KB DMA block by default.
FL_RMT5_USE_DMA=0from #5166 still works as a firmware-wide override, andFL_RMT5_DMA_AUTO=0restores the old always-DMA behaviour.Still open from the original report: the DMA block is a fixed 1024 symbols when DMA is used, and the ~3.7 KB driver registry / channel manager / buffer pool is untouched.
build: reproducible fresh checkout (pinned libs, tracked component lock)
zackees commentedon Nov 9, 2026
Verified resolved on master: PR #5228 / commit 453fee5 skips DMA automatically for short strips, and FL_RMT5_USE_DMA=0 provides an explicit opt-out. The current channel driver has the short-strip on-chip-memory selection path. Re-ran bash test rmt_5/channel_driver_rmt successfully (1/1 test target, including the short-strip regression). This is host regression evidence, not a new on-device heap measurement; no claim is made that all remaining channel-manager overhead disappeared.
fix(rmt5): add FL_RMT5_USE_DMA=0 to keep ESP32-S3 RMT off the 4 KB DM…
feat(rmt5): skip the DMA channel automatically for short strips (Fast…
fix(parlio): size DMA ring and TX descriptors to the frame (FastLED#5161
build: reproducible fresh checkout (pinned libs, tracked component lock)
build: reproducible fresh checkout (pinned libs, tracked component lock)
build: reproducible fresh checkout (pinned libs, tracked component lock)
build: reproducible fresh checkout (pinned libs, tracked component lock)