Anonymous
Not applicable
Sep 24, 2009
02:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 24, 2009
02:40 AM
Hi,
I am using EZ-USB FX2LP Chip for bulk high speed transfers.
My IN endpoint EP2 is configured as follows:
EP2CFG = 0xEA; // EP2IN, bulk, size 1024, 2x buffered
Is this allowed for bulk transfer?
I know that wMaxPacketSize are limited to 512 bytes in USB-2 spec.
But can I have EP2 size 1024 with wMaxPacketSize set to 512.
I am using EZ-USB FX2LP Chip for bulk high speed transfers.
My IN endpoint EP2 is configured as follows:
EP2CFG = 0xEA; // EP2IN, bulk, size 1024, 2x buffered
Is this allowed for bulk transfer?
I know that wMaxPacketSize are limited to 512 bytes in USB-2 spec.
But can I have EP2 size 1024 with wMaxPacketSize set to 512.
7 Replies
Anonymous
Not applicable
Sep 24, 2009
04:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 24, 2009
04:37 AM
wMaxPacketSize declared in the descriptor is just to inform the host the size... if you have going to override this in your firmware, when the host requests for data and the device is capable of responding with packets up to 1024 bytes... here the problem is if the device is gonna send a bulk packet of size greater than 512 bytes it will most likely crash the host i.e drivers don't try to catch all exceptions mainly under the assumption that the device at least follow the hard and fast rules set by the spec.... btw why do you want to do this???
Anonymous
Not applicable
Sep 24, 2009
11:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 24, 2009
11:32 AM
Thanks for feedback.
I implemented cypress chip as slave fifo with EP2IN size 1024 and wMaxPacketSize set to 1024 because at that time I did not know that wMaxPacketSize is limited to 512 for BULK transfers.
This by the way worked perfectly for windows and linux (It seems they manage this case at kernel level).
But I have problems under Mac OS X and I discovered the wMaxPacketSize limitation to 512.
Setting EP2IN size to 512 in firmware like this:
EP2CFG = 0xE0; // EP2IN, bulk, size 512, 4x buffered
Did not work.
At hardware side (slave fifo side) I only use manual commit packets and no auto-commits.
For that reason I expected to keep mi EP2IN size 1024 but set wMaxPacketSize to 512.
But This does not work either.
To make it simpler, would you say wMaxPacketSize should always be the same size than size set in EP2CFG? That in fact will answer every thing!
Thanks
I implemented cypress chip as slave fifo with EP2IN size 1024 and wMaxPacketSize set to 1024 because at that time I did not know that wMaxPacketSize is limited to 512 for BULK transfers.
This by the way worked perfectly for windows and linux (It seems they manage this case at kernel level).
But I have problems under Mac OS X and I discovered the wMaxPacketSize limitation to 512.
Setting EP2IN size to 512 in firmware like this:
EP2CFG = 0xE0; // EP2IN, bulk, size 512, 4x buffered
Did not work.
At hardware side (slave fifo side) I only use manual commit packets and no auto-commits.
For that reason I expected to keep mi EP2IN size 1024 but set wMaxPacketSize to 512.
But This does not work either.
To make it simpler, would you say wMaxPacketSize should always be the same size than size set in EP2CFG? That in fact will answer every thing!
Thanks
Anonymous
Not applicable
Sep 24, 2009
09:17 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 24, 2009
09:17 PM
ya.... you got it....
Anonymous
Not applicable
Sep 25, 2009
03:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 25, 2009
03:37 AM
Thanks
Everything is fine now.
My device (hardware, firmware and driver) works perfectly.
Cheers
Everything is fine now.
My device (hardware, firmware and driver) works perfectly.
Cheers
Anonymous
Not applicable
Mar 03, 2011
06:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 03, 2011
06:04 AM
Hi , i have small question about it
i also defined the EP2 1024 and wMaxPacketSize as 1024 using windows and it worked fine.
the question is using 1024 is better then 512 in performance despite that in the sepc of usb 2.0 it defined as 512? if it does not improve performance why use 1024? is it safe to use 1024?
Thanks
Pascal
Anonymous
Not applicable
Mar 03, 2011
12:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 03, 2011
12:13 PM
It is not safe to use 1024. Some host controllers might take it lightly but not all host controllers do. You might run into BSOD on certain machines.
Taking the better bandwidth theory. why not take it more than 1024? The buffer required, error handling etc are gonna scale up accordingly. 4 types of transfers are given to work with these tradeoffs.
Regards,
Anand
Attachments are accessible only for community members.
Anonymous
Not applicable
Jan 28, 2015
10:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 28, 2015
10:22 PM