FX3 CyU3PDmaChannelSetupSendBuffer

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

cross mob
Anonymous
Not applicable
        Hi, I have question about API function CyU3PDmaChannelSetupSendBuffer. I use CyU3PDmaChannelSetupSendBuffer API to send packet from FX3 to USB3.0 Host. In Super Speed periodic transfer (i.e. Interrupt In, Isochronous In), I want to transmit the data for two or more interval by ONE API call. For example, Max packet size : 1023 Byte Transfer data size : 16368 Byte(i.e. 1023Byte x 16packets) I expect that FX3 sends packets for 16 service intervals.(size of one packet :1023byte) I tried it. Result is Max packet size is 1024byte -> OK FX3 sent packets for 16 service intervals. (size of one packet : 1024byte. last packet is short packet) Max packet size is 1023byte -> does'nt work well FX3 sent packets for 16 service intervals.But packet size is illegal. (size of first packet : 1023byte. second packet : 1byte, third packet:2byte, fourth packet: 2byte ......The following are the same.) Is this API such a specification? I use API as follows. Let me know if usage of CyU3PDmaChannelSetupSendBuffer is wrong. --- Abstract of Source code ------------------------------------------ function A () { CyU3PDmaBuffer_t DmaBufInfo_src, DmaBufInfo_dst; uint32_t ret; ======= DmaBufInfo_src.buffer = (uint8_t *)adr; // Pointer to stored transfer data // The address is allocated by using CyU3PDmaBufferAlloc API DmaBufInfo_src.status = 0; // Buffer status. I don't use this. So I set 0. DmaBufInfo_src.size = bufsize; // Buffer size. I set bufsize multiple of 32bytes. // If Transfer data size is 16368bytes, then bufsize is 16384bytes. DmaBufInfo_src.count = length; // Byte count of valid data in buffer (Actual data size) // If Transfer data size is 16368bytes, then bufsize is 16368bytes. ret = CyU3PDmaChannelSetupSendBuffer(&(DmaCh[ep].DmaChHandle), &DmaBufInfo_src); } ---------------------------------------------------------------------- Regards,   
0 Likes
8 Replies
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable
        I'm so sorry but my text is illegal line feed. So I attached text file.   
0 Likes
Anonymous
Not applicable

Which version of the SDK are you using?

   

If you're not using Beta-2 can you please migrate to it and see if you're observing the same?

   

Regards,

   

Anand

0 Likes
Anonymous
Not applicable

We're able to replicate this at our end. We're currently investigating this, I'll update you once this is fixed.

   

Regards,

   

Anand

0 Likes
Anonymous
Not applicable
        Hi, Thank you for your great support! I look forward your answer. Regards,   
0 Likes
Anonymous
Not applicable

It seems a single buffer cannot be used to hold multiple packets of data when the max. packet size is odd. It will be necessary to package the data with only packet per buffer. If multiple packets need to be sent, different CyU3PDmaChannelSetupSendBuffer calls need to be made. A better method would be to get the pre-allocated buffers for the channel using CyU3PDmaChannelGetBuffer, put the data in this buffer and then commit using CyU3PDmaChannelCommitBuffer. Please check if this resolves the issue.

   

Regards,

   

Anand

0 Likes
Anonymous
Not applicable
        Hi, I'm sorry for my late reply. I think this method is not convenience for our application. I'll explain that reason later. Regards,   
0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable
        Hello. I'm sending my opinion and question. Regards,   
0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable
        This is figure of above reply.   
0 Likes