Hi all. I'm newbie in the USB field. but in the past week I studied alot!!
I'm using keil rl-USB library for making a composite device that uses Mass storage + HID. The proccessor used is AT91SAM7S256.
Till now the firmware was only an HID device but we dicided to deliver the little software needed for operation of the device within itself recently.
So...
AT91sam7s has endpoints numbered 0,1,2 and 3 and I seam to need 2 endpoints for my mass storage and 2 for HID device. I was wondering if t is possible at all or not and i investigated te net a bit. I read in sam7s datasheet that endpoint 0 and 3 are control type and they are bidirectional. 1. is it true endpoit 0 and 3 are bidirectional and 1 and 2 are not? 2. does bidirectional mean that i can config both direction as separate endpoints in my device?
I compiled and ran RL_lib's HID and Mass storage sample on my board successfully. I've also successfully changed the descriptor for making a composite mass storage + HID out of the 2 samples. but the HID sample seam to use endpoint 0 for sending and recieving data. it also kind of uses endpoint 3 for sending info to host(In direction) I was wondering that ... 3. is this sample using endpoint 0 for both recieving and sending data to the host? if so what is endpoint 3 doing here? 4. I wondered if endpoint 0 (IN + OUT)is the only requirement i should be able to remove endpoint 3 and did so. but after removing it from the descriptor the device won't get successfully installed on the host. It seamed that windows do not accept HID device descriptor with no additional endpoint(beside endpoint 0) configured. So, is it possible to have HID device that use endpoint 0 only?
> My device used to have dedicated IN/Out endpoints and after this(as a composite device) it will use default endpoint as it's OUT. The HID device also pass bulky data in both direction. > 1. will this affect my device's performance?
Usually, Interrupt OUT is faster than Set_Report request, when the size of the report is 64 bytes or less, - Interrupt OUT: 1 or 2 ms (USB frames) - Set_Report: 2 or 3 ms
But when the size of the report is greater than 64 bytes, Set_Report may be faster. Because the DATA stage of Set_Report may carry more than 64 bytes in single frame, whereas Interrupt OUT requires another frame.
> 2. what if i make a read-only mass storage device like a CD-ROM? I can realese one MSC endpoint and use it for HID this way?
MSC requires both bulk IN/OUT endpoints, even if it exposes CD-ROM.
> but driver instalation is hell slow. the same goes to disc drive instalation
When you are working on the same board and on the same PC, the low performance derives from the firmware difference, doesn't it?
Tsuneo
Thanx for the help Tsuneo