Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > FX3 CyU3PDmaChannelSetupSendBuffer

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



FX3 CyU3PDmaChannelSetupSendBuffer
Moderator:
RSKV

Post Reply
Follow this topic



FX3 CyU3PDmaChannelSetupSendBuffer

MacrossF posted on 10 Aug 2011 1:22 AM PST
Senior Member
16 Forum Posts
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,


Re: FX3 CyU3PDmaChannelSetupSendBuffer

MacrossF posted on 10 Aug 2011 01:45 AM PST
Senior Member
16 Forum Posts
I'm so sorry but my text is illegal line feed. So I attached text file.

Re: FX3 CyU3PDmaChannelSetupSendBuffer

aasi posted on 11 Aug 2011 12:02 AM PST
Cypress Employee
1073 Forum Posts

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



Re: FX3 CyU3PDmaChannelSetupSendBuffer

aasi posted on 11 Aug 2011 01:57 AM PST
Cypress Employee
1073 Forum Posts

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

Regards,

Anand



Re: FX3 CyU3PDmaChannelSetupSendBuffer

MacrossF posted on 11 Aug 2011 04:09 AM PST
Senior Member
16 Forum Posts
Hi, Thank you for your great support! I look forward your answer. Regards,

Re: FX3 CyU3PDmaChannelSetupSendBuffer

aasi posted on 12 Aug 2011 09:11 PM PST
Cypress Employee
1073 Forum Posts

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



Re: FX3 CyU3PDmaChannelSetupSendBuffer

MacrossF posted on 22 Aug 2011 05:51 AM PST
Senior Member
16 Forum Posts
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,

Re: FX3 CyU3PDmaChannelSetupSendBuffer

MacrossF posted on 24 Aug 2011 10:47 PM PST
Senior Member
16 Forum Posts
Hello. I'm sending my opinion and question. Regards,

Re: FX3 CyU3PDmaChannelSetupSendBuffer

MacrossF posted on 24 Aug 2011 10:49 PM PST
Senior Member
16 Forum Posts
This is figure of above reply.




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.