Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8035

General • Re: RP2350 DMA Ring Buffer?

$
0
0
Doesn't this defeat the purpose of a self-triggering mechanism for a ring buffer? I would expect that to be useful the READ_ADDR and WRITE_ADDR would roll back to the initial status, like this I don't understand how this feature could be really helpful.

Or there is something that I'm missing?
I believe that the intent is to use self-trigger in conjunction with the ring feature (channel_config_set_ring() etc), which means the READ_ADDR or WRITE_ADDR does end up back at the original value, though requiring that the buffers are power-of-2 sized and aligned in memory.

I'm not sure why you were using four DMA channels on RP2040 though - it could normally be done with two, either using the ring feature and simply cross-triggering, or resetting the buffer pointers in the interrupt handler if you can't live with aligned buffers.

On RP2040, single channel was normally not usable even if you didn't need the interrupts, because there was no infinite transfer count (and for many applications, 0xffffffff isn't close enough to infinite - it runs out in a few hours or days or weeks depending on the required throughput).

So RP2350 has fixed that and also given the option of an interrupt each time round.

Statistics: Posted by arg001 — Wed Aug 28, 2024 5:26 pm



Viewing all articles
Browse latest Browse all 8035

Trending Articles