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

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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

0 Likes
6 Replies
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

The only comment I see in the code for prodHeader is

   

/* The producer socket header offset */

   

I am not sure this in enlightening me.

0 Likes
Anonymous
Not applicable

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

   

Regards,

   

Anand

0 Likes
Anonymous
Not applicable

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?

0 Likes
Anonymous
Not applicable

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

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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

0 Likes