what is the Minimum Endpoint requirement for HID device?

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?

Parents
  • > 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?

    Atmel's AT91SAM7S data sheet isn't clear on the fact that EP1/2/3 are single direction, when they are assigned to bulk/interrupt/isoc
    www.atmel.com/.../doc6175.pdf

    I wasn't sure on this fact, until I found this definition of EPTYPE for each endpoint.

    35.6.10 UDP Endpoint Control and Status Register / UDP_CSRx
    EPTYPE[2:0]: Endpoint Type
    000 - Control
    001 - Isochronous OUT
    101 - Isochronous IN
    010 - Bulk OUT
    110 - Bulk IN
    011 - Interrupt OUT
    111 - Interrupt IN

    As you see, just single direction (IN or OUT) is available for bulk/interrupt/isoc.
    EP3 is bidirectional, just when it is assigned to control transfer.
    When EP3 is assigned to bulk/interrupt/isoc, it's also single direction.

    To distributes these endpoints to your MSC + HID composite device,
    - Common default endpoint (EP0)
    - Two endpoints (bulk IN/OUT) for MSC
    - One endpoint (interrupt IN) for HID
    (- - No endpoint for HID interrupt OUT)

    HID Output reports, if any, are passed over the default endpoint.
    HID interrupt OUT endpoint is optional on the HID spec.



    > 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..
    > 3. is this sample using endpoint 0 for both recieving and sending data to the host? if so what is endpoint 3 doing here?

    Are you talking about this example?
    RL_v4.22a \Keil\ARM\Boards\Atmel\AT91SAM7S-EK\RL\USB\RTX_HID
    This is the last RL version, in which you can directly touch to the USB descriptors.
    OR
    \Keil\ARM\Boards\Atmel\AT91SAM7S-EK\RL\USB\Device\HID of current MDK

    In general, HID Input / Output reports can be exchanged both over the interrupt endpoints, and over the default endpoint (Get_/Set_Report requests). The interrupt IN endpoint is used to send asynchronous (unrequested) data from the device to host. The reports over the default endpoint occurs at the timing when host actively requests exchange of report.

    > So, is it possible to have HID device that use endpoint 0 only?

    It can't. The interrupt IN endpoint is mandatory for HID device by the HID spec.

    Tsuneo

Reply
  • > 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?

    Atmel's AT91SAM7S data sheet isn't clear on the fact that EP1/2/3 are single direction, when they are assigned to bulk/interrupt/isoc
    www.atmel.com/.../doc6175.pdf

    I wasn't sure on this fact, until I found this definition of EPTYPE for each endpoint.

    35.6.10 UDP Endpoint Control and Status Register / UDP_CSRx
    EPTYPE[2:0]: Endpoint Type
    000 - Control
    001 - Isochronous OUT
    101 - Isochronous IN
    010 - Bulk OUT
    110 - Bulk IN
    011 - Interrupt OUT
    111 - Interrupt IN

    As you see, just single direction (IN or OUT) is available for bulk/interrupt/isoc.
    EP3 is bidirectional, just when it is assigned to control transfer.
    When EP3 is assigned to bulk/interrupt/isoc, it's also single direction.

    To distributes these endpoints to your MSC + HID composite device,
    - Common default endpoint (EP0)
    - Two endpoints (bulk IN/OUT) for MSC
    - One endpoint (interrupt IN) for HID
    (- - No endpoint for HID interrupt OUT)

    HID Output reports, if any, are passed over the default endpoint.
    HID interrupt OUT endpoint is optional on the HID spec.



    > 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..
    > 3. is this sample using endpoint 0 for both recieving and sending data to the host? if so what is endpoint 3 doing here?

    Are you talking about this example?
    RL_v4.22a \Keil\ARM\Boards\Atmel\AT91SAM7S-EK\RL\USB\RTX_HID
    This is the last RL version, in which you can directly touch to the USB descriptors.
    OR
    \Keil\ARM\Boards\Atmel\AT91SAM7S-EK\RL\USB\Device\HID of current MDK

    In general, HID Input / Output reports can be exchanged both over the interrupt endpoints, and over the default endpoint (Get_/Set_Report requests). The interrupt IN endpoint is used to send asynchronous (unrequested) data from the device to host. The reports over the default endpoint occurs at the timing when host actively requests exchange of report.

    > So, is it possible to have HID device that use endpoint 0 only?

    It can't. The interrupt IN endpoint is mandatory for HID device by the HID spec.

    Tsuneo

Children
More questions in this forum