I2SClocklessLedDriver
I2SClocklessLedDriver copied to clipboard
DMA mode takes up 60k of ram just for a single 300 led strip!!!!!
Hi, this library is absolutely perfect for me. I've been experiencing many issues with glitching when using BLE and driving LEDs at the same time. However, when I define FULL_DMA_BUFFER, 60kB of ram is consumed and I am already running low on ram on this project :(
Is this caused by a bug? I understand that we need 3x the bytes of the led strip data, but in my case this would be less than 1kB
Hello sorry for the late reply the FULL_DMA is indeed memory hungry. THe DMA size should be nb_of_leds_per_strip x 3 x 8 x 2 x 3 hence in your case 43.2k this is strangethat you have 60k can you share your code ? Indeed the issue with the DMA is that for 300leds or 300*16 leds the amont of ram taken is the same I will have a closer look at it maybe I have a mistep somewhere
I2S1 support to 8 pins. so if we need up to 8 parallel data and we use I2S 1 instead 0 then we can use save 50% memory.
DMA size should be nb_of_leds_per_strip x 3 x 8 x 3
pls guide me how to use I2S 1 in this driver?
thanks
For existing 16 bit width driver (I2S 0) with FULL_DMA, what is the maximum limit of nb_of_leds_per_strip?
Can I go for 1024 or 2048 Leds per strip?
Thanks & regards
Hello if you’re using full dma buffer it will depend of your memory.
HelloIt’s not responsible of the i2s used. I need a change of code to not use 16 but 8 buffer size. I can make it a choice. YvesOn 2 Jul 2023, at 07:51, Jagadish Paul @.***> wrote: I2S1 support to 8 pins. so if we need up to 8 parallel data and we use I2S 1 instead 0 then we can use save 50% memory. DMA size should be nb_of_leds_per_strip x 3 x 8 x 3 pls guide me how to use I2S 1 in this driver? thanks
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
Sorry for not to understand your reply correctly.
- Did you mean that it is not possible to use I2S 1 instead I2s 0. if so then can you explain the reason? As per my knowledge I2S 1 has a offset of pin from I2S 0. Other things almost same.
- Are you going to change you code in such a manner that with I2S 0 & within 8 strip you will manage the code it use 8 bit buffer instead of 16 bit? Thnaks
ill depend of your memor
I want to know value of nb_of_leds_per_strip for existin memory of ESP32.
If you use full dma I think around 2200leds per strip
Can I ask you what you are trying to achieve?
full dma I think around 2200leds per strip
It sounds good.
I will to build 8 data parallel controller with 2048 pixels per data line. Total capacity 16k pixels.
On Sun, 2 Jul, 2023, 1:00 pm hpwit, @.***> wrote:
Can I ask you what you are trying to achieve?
— Reply to this email directly, view it on GitHub https://github.com/hpwit/I2SClocklessLedDriver/issues/11#issuecomment-1616421420, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD5AG6RYY63AQ3N5BCVIKLXOEPQBANCNFSM6AAAAAAR55M56Y . You are receiving this because you commented.Message ID: @.***>
If you do this you will to have enough ram for much of the rest. Can I suggest 2 things ?
- use the Virtual driver to use more pins and have a better refresh rate because now you're refresh rate is 16fps !! without counting the time to transpose the entire screen.
- do not use full dma buffer in your case
- if you're afraid that you will have interrupt issues look at this https://youtu.be/sYtVOU8Hpss If I may ask what will this will be used for ?
Thanks for you reply.
I will try as you suggested.
Sir one question I have.
Can you explain please how frame rate increase in virtual driver rather than direct parallel driver?
As I understand in both the cases matrix transpose is done.
Thanks and regards
On Tue, 4 Jul, 2023, 12:06 pm hpwit, @.***> wrote:
If you do this you will to have enough ram for much of the rest. Can I suggest 2 things ?
- use the Virtual driver to use more pins and have a better refresh rate because now you're refresh rate is 16fps !! without counting the time to transpose the entire screen.
- do not use full dma buffer in your case
- if you're afraid that you will have interrupt issues look at this https://youtu.be/sYtVOU8Hpss If I may ask what will this will be used for ?
— Reply to this email directly, view it on GitHub https://github.com/hpwit/I2SClocklessLedDriver/issues/11#issuecomment-1619592139, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD5AG62N2CAYP654EPXLITXOO2XTANCNFSM6AAAAAAR55M56Y . You are receiving this because you commented.Message ID: @.***>
Hello The frame rate increases because you can have more parallel pins. I a nutshell the virtual driver allows you to drive 8 strips individually per pin of the esp32 using a shift register. Hence you can drive your 16k less over 32 strips of 512 leds. Using 6 pins of the esp32 (4 data 1 latch 1data) Hence the fps will be 65 instead of 16.
Ok, thanks for the clarification.
On Wed, 5 Jul, 2023, 10:23 am hpwit, @.***> wrote:
Hello The frame rate increases because you can have more parallel pins. I a nutshell the virtual driver allows you to drive 8 strips individually per pin of the esp32 using a shift register. Hence you can drive your 16k less over 32 strips of 512 leds. Using 6 pins of the esp32 (4 data 1 latch 1data) Hence the fps will be 65 instead of 16.
— Reply to this email directly, view it on GitHub https://github.com/hpwit/I2SClocklessLedDriver/issues/11#issuecomment-1621023981, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD5AG3HKF6IJ7LY2VKOAULXOTXNFANCNFSM6AAAAAAR55M56Y . You are receiving this because you commented.Message ID: @.***>
If you use full dma I think around 2200leds per strip
Remember that the target is moving, too. 16MB Octal PSRAM ESP32-S3 boards can be made/found, though they're not exactly at the $5 point like the 8's are. 32MB's on latest wafer has been proven to work by people mounting their own SPIRAM chips, e.g. https://github.com/huming2207/jumbo-s3
Neither of these are exactly common yet and I don't know if you won't run out of gas before just multiplying by 2 forever, but new hardware is always on the way.
As inexpensive as these parts are, and given the price premium of the more dense parts, if the 8MB limit is a real drag, multiple chips remains the easiest solution for most people.
"Two chips in the hand is worth one on the way."