Skip to main content
mikemanzano.javier9
Associate III
May 14, 2017
Question

STM32 HID Multiple Endpoint

  • May 14, 2017
  • 4 replies
  • 2405 views
Posted on May 14, 2017 at 02:40

Hi I would like to ask if it is possible to use 2 end point for HID device?

for example: EP1 IN and out for maintenance commands/status

then EP2 IN and out for remote command and status

for transfer mode, i like to have the first as interrupt transfer then the other as bulk transfer..

if not possible, both interrupt transfer..

can anyone give me advice on this? is this feasible using generic HID driver?

Thanks,

Mike

    This topic has been closed for replies.

    4 replies

    denis2
    Associate
    May 16, 2017
    Posted on May 16, 2017 at 14:46

    Well, physically there are enough EPs available in MCU. But there is a restriction for HID device - it can only have 1 IN and 1 OUT endpoints, so I'm afraid you won't be able to configure 2 IN endpoints in a single HID interface.

    However, you can make it a composite device with 2 separate HID devices, with each having its own IN EP. For this purpose you would need to change descriptors respectively, to add second interface descriptor, HID report descriptor for it and so on.

    By the way, why do you think you would need to use two IN EPs? Is this something related with max throughput?

    Basically speaking, you could define two or more collections in one HID report descriptor and send different types of reports using single IN EP..

    mikemanzano.javier9
    Associate III
    May 16, 2017
    Posted on May 16, 2017 at 17:07

    Hi,

    Thanks for the reply.

    If composite device is possible, that will fit my project also.

    'By the way, why do you think you would need to use two IN EPs? Is this something related with max throughput?'

    - I did not think it could increase 

    throughput, but if it could, i would be also good. Right now, it think there is no way I can extend 64 byte

    per report tp 512 bytes for HID. Im constrained to HID because of project requirement and may be, the benefit of  no need to install driver compared to

    generic usb drivers. In my image, I cannot use Bulk transfer with HID right?

    The real reason why I like to use 2 end point is, the device im creating has two functions for external output.

    1.) Status report and result report. for some weird reason, my client request us to have some sort of protocol exchange for geting status and result,

    similar to RS232 standard, with ENQ/ACK/Checksum and EOT..

    2.)I will be implementing remote operation where i'm planning to send LCD display from VRAM of my panel to mirror the device GUI to the Application using USB.

    I dont like to put such complicated control for this function. My image is I will just use simple Report strucutre. My image also is I will use DMA to transfer data from 

    panels VRAM directly to endpoint.. though I still have to consider maybe I have to append control for each record packet.

    Bottom line is, I dont want to mix up these 2 functions of my device.

    I will research how to implement and try it for now. If you have some advice, I would really appreciate it.

    Thanks,

    Mike

    mikemanzano.javier9
    Associate III
    May 16, 2017
    Posted on May 16, 2017 at 17:09

    Im using STM32F103ZE.