Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Who own the memory when calling CyU3PDmaChannelSetupSendBuffer?

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Who own the memory when calling CyU3PDmaChannelSetupSendBuffer?
Moderator:
RSKV

Post Reply
Follow this topic



Who own the memory when calling CyU3PDmaChannelSetupSendBuffer?

oliverks posted on 06 Sep 2011 12:00 PM PST
Senior Member
12 Forum 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 */

 

 




Re: Who own the memory when calling CyU3PDmaChannelSetupSendBuffer?

aasi posted on 12 Sep 2011 04:04 AM PST
Cypress Employee
1073 Forum 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.

Regards,

Anand






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.