According to the RP2350 datasheet the new DMA subsystem now uses the four MSB bits of TRANS_COUNT as a field called "MODE". This mode allows to set it to modes "TRIGGER_SELF" and "ENDLESS".
According to the datasheet the TRIGGER_SELF is useful for ring buffers, once the transfer ends it raises an interrupt and triggers itself. I could see it being useful if all the transfers parameters were restarted but according to the datasheet "TRANS_COUNT is reloaded, and the channel resumes from the current READ_ADDR and WRITE_ADDR addresses".
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?
In my particular case I have a 128Kb buffer that I as ring buffer, on the RP2040 I used four DMA channels with the ring set at 32k and chained all four together in a ring, is this something possible to achieve with only a single DMA channel with this new functionality in the RP2350 or at the end the new functionality is not useful and I must create 12 DMA channels for this?
Thanks.
According to the datasheet the TRIGGER_SELF is useful for ring buffers, once the transfer ends it raises an interrupt and triggers itself. I could see it being useful if all the transfers parameters were restarted but according to the datasheet "TRANS_COUNT is reloaded, and the channel resumes from the current READ_ADDR and WRITE_ADDR addresses".
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?
In my particular case I have a 128Kb buffer that I as ring buffer, on the RP2040 I used four DMA channels with the ring set at 32k and chained all four together in a ring, is this something possible to achieve with only a single DMA channel with this new functionality in the RP2350 or at the end the new functionality is not useful and I must create 12 DMA channels for this?
Thanks.
Statistics: Posted by Dr.Gusman — Wed Aug 28, 2024 4:21 pm — Replies 8 — Views 126