RMT with buffer on DMA

mattia424
Posts: 16
Joined: Sun Jan 07, 2024 11:56 pm

RMT with buffer on DMA

Postby mattia424 » Sat Jan 04, 2025 12:55 pm

Hello everyone,
I am using the RMT driver to send a series of bits to some RGB leds, specifically I should use a buffer greater than 2046 blocks and enable the loop_count = -1 configuration so that the driver can delegate the management of the leds and completely free up the cpu.
I put the flag with_dma = true but I always get the error E (685) rmt: rmt_new_tx_channel(252): mem_block_symbols can't exceed 2046.
mem_block_symbols I put as parameter > 2046 that is the blocks I actually need.

How can I get this to work?
When with_dma is to true how should one behave in order for the system to work properly?
Thanks

MicroController
Posts: 2669
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: RMT with buffer on DMA

Postby MicroController » Sat Jan 04, 2025 8:07 pm

E (685) rmt: rmt_new_tx_channel(252): mem_block_symbols can't exceed 2046.
mem_block_symbols I put as parameter > 2046 that is the blocks I actually need.

How can I get this to work?
Update to a newer IDF version. Seems that error was removed in 07/2024.

mattia424
Posts: 16
Joined: Sun Jan 07, 2024 11:56 pm

Re: RMT with buffer on DMA

Postby mattia424 » Thu Jan 09, 2025 2:06 pm

Unfortunately I can't update to IDF 5.4 because support in platformio has not been released yet, do you think if I just replace esp_driver_rmt with the new version it might work?
Thanks

MicroController
Posts: 2669
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: RMT with buffer on DMA

Postby MicroController » Thu Jan 09, 2025 9:26 pm

It might. If you get it to compile I guess it'll work.
You can easily test it out by copying the new esp_driver_rmt into your project's "components" directory. That should make the new code take precedence over the IDF component of the same name. If it gives you headaches compiling, just delete the new driver from the "components" directory and you're back to normal.

MicroController
Posts: 2669
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: RMT with buffer on DMA

Postby MicroController » Thu Jan 09, 2025 9:38 pm

Unfortunately I can't update to IDF 5.4 because support in platformio has not been released yet
My man, you're so out of date :-D
https://registry.platformio.org/tools/p ... ork-espidf
3.50400.0 (5.4.0) has been published yesterday already ;-)

mattia424
Posts: 16
Joined: Sun Jan 07, 2024 11:56 pm

Re: RMT with buffer on DMA

Postby mattia424 » Thu Jan 09, 2025 10:38 pm

Unfortunately I can't update to IDF 5.4 because support in platformio has not been released yet
My man, you're so out of date :-D
https://registry.platformio.org/tools/p ... ork-espidf
3.50400.0 (5.4.0) has been published yesterday already ;-)

That one I had missed ahah, anyway I still can't use it as platform-espressif32 is still at version 6.9.0 (espidf 5.3.1 support)
https://registry.platformio.org/platfor ... spressif32
I guess there must be espidf 5.4.0 support here too is that correct?
Are there other methods to do the upgrade also workaround?

It might. If you get it to compile I guess it'll work.
You can easily test it out by copying the new esp_driver_rmt into your project's "components" directory. That should make the new code take precedence over the IDF component of the same name. If it gives you headaches compiling, just delete the new driver from the "components" directory and you're back to normal.

I tried using the new component as you indicated and it compiles.
I still don't understand what I have to put in "mem_block_symbols" when DMA is active.... If I put the actual value >2046 (otherwise I wouldn't be here using DMA) it still gives me

Code: Select all

E (685) rmt: rmt_new_tx_channel(252): mem_block_symbols can't exceed 2046.
if instead I use this parameter to say how big is the memory to ping pong from DMA the output it gives me is

Code: Select all

E rmt: encoding artifacts can't exceed hw memory block for............
Thanks!

Who is online

Users browsing this forum: Applebot, Bing [Bot], Semrush [Bot] and 4 guests