Yes, to use ring mode the buffer must be power-of-2 sized and aligned to that size.I suppose that I have to use ring to wrap addresses, but don't fully understand the docs. Must be the buffer aligned with size of the buffer? Any way it is not good for me because by buffers can't be power of 2 and makes de logic less clear.
But the alternative is using one DMA to reload another, by writing one or more of the 4 configuration registers, finishing with one that is a trigger alias (the register addresses and aliases are arranged so that you can write any combination of 1, 2, or 3 registers ending with a trigger). Typically one DMA channel will be doing the work, which then chains to another one which reloads the first one for the next transfer.
Lots of ways you can use that; for your original scheme with lots of buffers, you could have one DMA doing the work that chains to another one that re-writes the buffer address for the next buffer. If your total number of buffers was a power of 2, then that reload channel could use ring mode to run indefinitely (and the list of buffer addresses would be small enough that having to align it is no hardship).
However, all of this is refinement for more performance that you don't really need, and it seems like your existing setup is simpler and ought to work.
Statistics: Posted by arg001 — Thu Oct 24, 2024 7:32 am