Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > CyU3PDmaChannelGetStatus

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



CyU3PDmaChannelGetStatus
Moderator:
RSKV

Post Reply
Follow this topic



CyU3PDmaChannelGetStatus

sodafarl posted on 05 Apr 2012 3:12 AM PST
Top Contributor
128 Forum Posts

Hi,

I am using the CyU3PDmaChannelGetStatus function to monitor the number of DMA buffers transferred across a DMA channel between a producer socket  and a consumer socket. The producer socket receives it data payload via the GPIF II from an FPGA while the consumer socket is an In Endpoint that connects over USB to a host PC. By using the CyU3PDmaChannelGetStatus function I can monitor the number of DMA buffers that have been generated on the producer side by looking at the prodXferCount variable returned by this function. Also I can monitor the number of consumer buffers that have been sent over the In endpoint to the PC by checking consXferCount. The problem I am seeing is that the producer buffer count increments ok whenever data is sent to the producer socket but the consumer socket increments by 1 buffer count even though no data has been sent to the PC. What seems to be happening is that as soon as the producer socket fills a single DMA buffer this is then sent to the consumer socket even before the PC has requested data from this endpoint. For example if the producer socket DMA channel is 8 buffers of 1024 deep then whenever I fill this the prodXfer count increments by 8, however if |I look at consXferCount I notice this has incremented by 1
even though no transfers to the PC have taken place.

Is there a way to prevent the consumer socket count incrementing until the PC reads data from it?
 

Sodafarl




Re: CyU3PDmaChannelGetStatus

aasi posted on 06 Apr 2012 01:32 AM PST
Cypress Employee
1073 Forum Posts

Hi,

Can you please add more information on why you would want it this way so that It is easier for me to  understand what kind of feature you're actually looking at.

Regards,

Anand



Re: CyU3PDmaChannelGetStatus

sodafarl posted on 06 Apr 2012 02:20 AM PST
Top Contributor
128 Forum Posts

Hi Anand,

I want to implement the CyU3PDmaChannelGetStatus in order to find out if a particular DMA channel is empty. My plan is to compare the prodXfercount and the consxfercount and if they are equal then I know the DMA channel is empty. . if the DMA channel is not empty then I can signal other processes with this information. However if the consxfercount increments by 1 buffer count before the PC has consumed the data then I can't use this method because if I write a buffer to the producer socket then the consumer count also increments by a buffer count  indicating the channel is empty when it is not because the data has not been consumed by the PC.

Sodafarl



Re: CyU3PDmaChannelGetStatus

sodafarl posted on 10 May 2012 04:17 AM PST
Top Contributor
128 Forum Posts

Hi Anand,

Is there any further information about my question.

Sodafarl

 






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.