-
Notifications
You must be signed in to change notification settings - Fork 9
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
p44-ledchain for OpenWrt with I2S and DMA. #6
Comments
@jagspaul yes, i2s does have DMA, and the needed bit rate (at least 2.8 Mhz to create proper ws28xx timing) is in the same ballpark as for 48kHz audio (1.5 MHz), so that should be possible.
Not really, the current limit is 2k for buffer size and frame rate reasons, and could be set higher at the cost of reduced framerate. But even the theoretical maximal framerate (assuming zero overhead) goes down with the number of leds in a chain. At 1k LEDs, it's already down to ~40Hz, so if you want to replace 4 PWMs with 1k LEDs each with the single i2s (4k LEDs), you'd get a max frame rate of ~10Hz 😞 So yes, i2s with DMA would be nice to have, but doing a DMA based kernel driver is not something I'm fluent in 😉 . Whoever wants to do that based on p44-ledchain is welcome, of course! |
Thanks for your reply. https://github.com/hpwit/I2SClocklessVirtualLedDriver I really need p44-ledchain 8K pixels driver. |
[At 1k LEDs, it's already down to ~40Hz, so if you want to replace 4 PWMs with 1k LEDs each with the single i2s (4k LEDs), you'd get a max frame rate of ~10Hz 😞] Can I get 2K LED @20 Hz frame rate? If I get 4 PWMs and each 2K leds @20 Hz, It may gives me 8K pixels drivers. jags |
That's the theoretical maximum, but there is some overhead (interrupt latency, bit packing restrictions into 64bit runs) that will reduce the effective rate below 20Hz.
Using an Omega2S instead, which has all 4 PWMs exposed. |
The principle is simple. What takes time in doing such a driver is understanding the details of the actual chip, which is completely different in the MT7688 than in the ESP32. Furthermore, the MT7688 has a very meagre datasheet, it just lists bits and registers, with little context. And finally, one needs to know how to do a proper linux driver using DMA (haven't done that so far, so: would need to invest a lot into learning this)
That would indeed make a I2S driver worth considering! For one output, I2S does not give much more than the PWM solution, however when it can drive 8 or 16 outputs simultaneously, that's another story 😄
Still, my day has 24h only, and with all the other things on my todo list I don't know yet if and when I'll find time to look into this 🙄 |
Hello,
Thanks for your reply.
I understand everything you say.
Now I started thinking in a different way and I explain it to you.
My requirement is to make an ethernet artnet based RGB led controller
(ws2811) with 8K - 16K leds support. I already have tried with the ESP32
controller but able to manage 4K leds @25fps only. This limitation due to
low capacity ethernet of ESP32.
So I thought to use omega 2 as it has high speed ethernet but no success
because of the low end led driver.
Now I want to build it with a combination of both omega 2 + ESP32. Omega 2
will handle ethernet artnet and the led driver will be taken care of by
ESP32.
Omea 2 will send RGB frames to ESP32 through a 25Mz SPI bus.
In this connection I need your valuable suggestions and help.
jags
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
…On Sat, Jul 22, 2023 at 5:53 PM Lukas Zeller ***@***.***> wrote:
some one has build I2S DMA driver on ESP32 chip.
The principle is simple. What takes time in doing such a driver is
understanding the details of the actual chip, which is completely different
in the MT7688 than in the ESP32. Furthermore, the MT7688 has a very meagre
datasheet, it just lists bits and registers, with little context. And
finally, one needs to know how to do a proper linux driver using DMA
(haven't done that so far, so: would need to invest a lot into learning
this)
And using a serial in parallel out shift register each port virtually made
8 led bus. I am sending the link for reference. Hope this can help to make
large capacity pixel driver on p44-ledchain.
https://github.com/hpwit/I2SClocklessVirtualLedDriver
That would indeed make a I2S driver worth considering! For one output, I2S
does not give much more than the PWM solution, however when it can drive 8
or 16 outputs simultaneously, that's another story 😄
I really need p44-ledchain 8K pixels driver.
Still, my day has 24h only, and with all the other things on my todo list
I don't know yet if and when I'll find time to look into this 🙄
—
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD5AG2QGUALSIA2XZPPHADXRPA5HANCNFSM6AAAAAA2SRFIG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks for your great project p44-ledchain for OpenWrt.
However I want something different. As you told p44-ledchain based on PWM bus and MT7688 does not support DMA over PWM, So your module is limited to 1K pixels on each PWM.
But I want large capacity pixels support by Omega2 board, and for this DMA is essential.
I believe I2S bus has DMA and if you build p44-ledchain driver on I2S bus we can have driver with DMA support.
Thanks & regards
jags
The text was updated successfully, but these errors were encountered: