Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > maximum speed of USB in bulk-mode, USB interrupt

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



maximum speed of USB in bulk-mode, USB interrupt
Moderator:
RKRM

Post Reply
Follow this topic



maximum speed of USB in bulk-mode, USB interrupt

homer123 posted on 16 Jul 2011 2:36 PM PST
Member
2 Forum Posts

Hi!

My question is concerning the maximum data-speed I can achieve with the USB-connection in bulk-mode.
In the endpoint attributes I can set the mximum packet size to 64 byte and the intervval to 1 ms, while the data sheet says that the methods USBFS_ReadOutEP and USBFS_LoadInEP say that they can handle a length of 512 byte. I guess several packets can be sent and received at once. Am I right that the maximum speed I can achieve with this connection is 512byte/ms (500kb/s)?

A second question: the data-sheet of the device says that all USB-transfers trigger an interrupt. How can I check if an interrupt of a bulk-out-transfer occured?

Thanks in advance.




Re: maximum speed of USB in bulk-mode, USB interrupt

U2 posted on 19 Jul 2011 02:26 AM PST
Cypress Employee
589 Forum Posts

My question is concerning the maximum data-speed I can achieve with the USB-connection in bulk-mode.

We have seen speeds as high as 1Mbits/Sec on Bulk Endpoint with CyUSB.dll. 

 

In the endpoint attributes I can set the mximum packet size to 64 byte and the intervval to 1 ms, while the data sheet says that the methods USBFS_ReadOutEP and USBFS_LoadInEP say that they can handle a length of 512 byte.

The API is a generic API for all types of USB data transfer, that is, Interrupt, Bulk and ISOC. The methods USBFS_ReadOutEP and USBFS_LoadInEP can handle 512 bytes for ISOC transfer. For Bulk transfer, the above APIs can handle only upto 64 bytes. All this is according to USB spec, " For full speed endpoints, the maximum bulk packet size is either 8, 16, 32 or 64 bytes long.In the API USBFS_LoadInEP, a check is made for the Maximum packet size parameter that is specified in the USBFS customiser and Limits length to available buffer space(64 in case of Bulk transfer). The interval parameter is valid only for Interrupt type of transfer(Host polls USB device at regular interval), for bulk transfer this parameter is irrelavant. Bulk transfer is considered to be an asynchronous type of transfer.

 

the data-sheet of the device says that all USB-transfers trigger an interrupt. How can I check if an interrupt of a bulk-out-transfer occured?

Every Endpoint in PSoC3/PSoC5 is associated with an Endpoint interrupt and an ISR. These ISRs can be seen in the file, USBFS_1_episr.c. For example USBFS EP ISR is seen as, 

CY_ISR(USBFS_1_EP_1_ISR)

    {

        /* `#START EP1_USER_CODE` Place your code here */


        /* `#END` */     

CY_GET_REG8(USBFS_1_SIE_EP1_CR0_PTR); /* Must read the mode reg */

......................

......................

    }

 

Similarly other ISRs are avilable in the same file. If you have configured a particular Endpoint as Bulk In Endpoint, the corresponding ISR will be triggerd when host sends a packet and you can set a falg within this ISR to indicate the occurrence of this ISR.

I hope this helps.

 



Re: maximum speed of USB in bulk-mode, USB interrupt

homer123 posted on 19 Jul 2011 06:52 AM PST
Member
2 Forum Posts

Thanks a lot, now everything is clear to me.
I always thought that the Interval has no effect on bulk-transfer but I came across some different stories on the internet, which were all wrong, and I was a bit confused because PSoC Creator let me fill in a parameter to the interval-box when I have selected bulk-mode. Maybe that will be changed in future versions of the Creator.

Greetings from far away.

 



Re: maximum speed of USB in bulk-mode, USB interrupt

dwhobrey posted on 20 Dec 2012 07:30 AM PST
Member
5 Forum Posts

Are the ISRs called after completion for both IN and OUT endpoint bulk xfers?



Re: maximum speed of USB in bulk-mode, USB interrupt

PSoC Rocks posted on 22 Dec 2012 02:23 AM PST
Top Contributor
141 Forum Posts

 Yes. ISR will be executed once the data transfer (In or Out) is complete.






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.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 06/15/20