Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > What do the prodHeader, prodFooter, & consHeader fields do?

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



What do the prodHeader, prodFooter, & consHeader fields do?
Moderator:
RSKV

Post Reply
Follow this topic



What do the prodHeader, prodFooter, & consHeader fields do?

oliverks posted on 01 Sep 2011 2:28 PM PST
Senior Member
12 Forum Posts

Several of the dma structures have the prodHeader, prodFooter, & consHeader fields.  For example CyU3PDmaMultiChannelConfig_t, CyU3PDmaChannel, and CyU3PDmaChannelConfig_t contain them.  I don't see any documentation on what they do.

Does anyone know if these can be used to chop off a header or footer on a DMA transfer in an automated fashion?  Any information people have about these fields would be appreciated.

Oliver




Re: What do the prodHeader, prodFooter, & consHeader fields do?

aasi posted on 05 Sep 2011 11:25 PM PST
Cypress Employee
1073 Forum Posts

prodHeader is the producer socket header offset, prodFooter the footer offset

and consHeader the consumer socket header offset.  The header files of the SDK have comments which provide information on these parameters you might want to have at the comment in these files.

Regards,

Anand



Re: What do the prodHeader, prodFooter, & consHeader fields do?

oliverks posted on 06 Sep 2011 09:47 AM PST
Senior Member
12 Forum Posts

The only comment I see in the code for prodHeader is

/* The producer socket header offset */

I am not sure this in enlightening me.

 

 



Re: What do the prodHeader, prodFooter, & consHeader fields do?

aasi posted on 06 Sep 2011 10:23 AM PST
Cypress Employee
1073 Forum Posts

The offset from which you want to take the data i.e. the data before that is the header.

Regards,

Anand



Re: What do the prodHeader, prodFooter, & consHeader fields do?

oliverks posted on 06 Sep 2011 12:09 PM PST
Senior Member
12 Forum Posts

So say I wrote this code

CyU3PDmaChannelConfig_t myDMA;

myDMA.prodHeader = 16;

...

CyU3PDmaChannelCreate( &handle, CY_U3P_DMA_TYPE_MANUAL, &myDMA );

 

and then submitted a buffer

CyU3PDmaChannelSetupSendBuffer( &handle, &buffer );

Would the first 16 bytes not be transfered to the consumer as they are my header?

How does the consumer header differ from the producer header?

 



Re: What do the prodHeader, prodFooter, & consHeader fields do?

aasi posted on 07 Sep 2011 10:41 PM PST
Cypress Employee
1073 Forum Posts

Hi,

Look at it like 2 buffers,

Say we've two 4k buffers and I want to copy the second 1k data of buffer1 to the third 1k space of buffer2. So I can use the consheader to provide the required address offset on the consumer socket side.

Regards,

Anand



Re: What do the prodHeader, prodFooter, & consHeader fields do?

oliverks posted on 07 Sep 2011 03:35 PM PST
Senior Member
12 Forum Posts

OK does the attached image make sense?

 

In this case we take a DMA buffer that was "produced" by some DMA channel.  We then call CyU3PDmaChannelSetupSendBuffer for a DMA channel that has its CyU3PDmaChannelConfig_t set with non zero values for the prodHeader, prodFooter, & consHeader fields. 

 

Does the block labeled "data to transfer" between the prodHeader & prodFooter fields get moved to the area labeled "where to transfer data" after the consHeader field? 

 

I assume none of the prodHeader, and prodFooter moves.  I assume the consHeader is not disturbed.  Is this correct?

 

Is this the correct interpretation?

 

Oliver






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.