Is it possible not to declare the required memory for all parallel I2S channels on an ESP32 ? #732
Replies: 5 comments 14 replies
-
No, there isn't a way to use less than 8 channels using the i2s parallel mode. The I2S hardware sends them using DMA using a parallel mode that is either 8 channels wide or 16 channels wide. It requires a DMA buffer to asynchronously send the data from; so stuck with either 8 or 16. RMT methods support four channels (some ESP32 hardware up to 8 channels) but only the first four tend to be sent near the same time. Some ESP32 hardware supports two i2s busses, so you could also get two channels using i2s in non-parallel modes. |
Beta Was this translation helpful? Give feedback.
-
Thank you !! so helpful, now just to get google to show me the correct path. |
Beta Was this translation helpful? Give feedback.
-
i tried the same way it is done with the parallel method NeoPixelBus<NeoRgbFeature, NeoEsp32I2sNWs2812xInvertedMethod> *strip[] = {NULL, NULL}; void setup() { strip[0] -> Begin(); void loop() {
|
Beta Was this translation helpful? Give feedback.
-
Yeah something like that. I'm not fussed about features, it's easy enough to do at runtime to set the RGB(W) order. There are theoretically 6 RGB orders, It is not a big deal. The methods are a different matter, I guess it won't be very elegant, but i guess i will manage in some way. |
Beta Was this translation helpful? Give feedback.
-
Well yeah in some way it's the method that i'm after. Ideally actually a object that has access to the main functions of a set of specified methods would work. See with the access to the pointer for the pixel buffer the need for dynamic features doesn't really exist, even 32 bit features are easy enough to create on the fly. It is the compile of the Begin() & Show() functions and the access to the correct method specific versions of them, that is of interest to me |
Beta Was this translation helpful? Give feedback.
-
I2S is as far as i know the most CPU efficient & most reliable way of creating a ledstrip data signal, The 8 channel parallel I2S is fantastic of course, with it's refresh rate being limited by the longest strip. Unfortunately it seems that the memory allocatedfor a single strip is almost the same as the memory allocated for 8 strips of the same maximum length.
I want to be able to transmit 680 pixels per channel, (4 universes) but even on a single channel, that results in an allocation of more than 130 Kb, with each additional strip requiring just over 2 Kb extra. It appears as the whole block is declared for all 8 channels initially, but i never intend to use all 8. Is there a way to circumvent this ?
Beta Was this translation helpful? Give feedback.
All reactions