You are here

Who own the memory when calling CyU3PDmaChannelSetupSendBuffer? | Cypress Semiconductor

Who own the memory when calling CyU3PDmaChannelSetupSendBuffer?

Summary: 1 Reply, Latest post by aasi on 12 Sep 2011 06:04 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
oliverks's picture
12 posts

If I receive a DMA buffer from the GPIF (that is I get a callback) can I use the DMA buffer by passing it to CyU3PDmaChannelSetupSendBuffer?

Can I create a "fake" CyU3PDmaBuffer_t where the buffer field points at a location in memory that another DMA channel is using?

For example can I call CyU3PDmaChannelGetBuffer to get a CyU3PDmaBuffer_t for a DMA transfer that just completed, and then pass that to CyU3PDmaChannelSetupSendBuffer to commit the same buffer with no memory copying to the outgoing DMA channel?

Likewise can I allocate my own CyU3PDmaBuffer_t by using a CyU3PMemAlloc and then populate the fields to make it looks like a CyU3PDmaBuffer_t?

CyU3PDmaBuffer_t *my_dma = (CyU3PDmaBuffer_t *)CyU3PMemAlloc(sizeof(CyU3PMemAlloc));

my_dma.buffer = p; /* some location in memory that is part of a dma memory on another channel */

my_dma.count = 1;

my_dma.size = length_to_transfer; /* amount of memory to transfer */

my_dma.status = ???; /* not sure what should go here, maybe CyU3PDmaMode_t */



aasi's picture
Cypress Employee
1166 posts

Hi Oliver,

Please create a tech support case (MyAccount->MyCases) for this so that one of our engineers can have a closer look at the methodology you're trying to implement.



Log in to post new comments.