+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Full Member level 1
    Points: 639, Level: 5

    Join Date
    Nov 2018
    Posts
    96
    Helped
    1 / 1
    Points
    639
    Level
    5

    Understanding the USB Protocol

    Hi,

    I am trying to understand the connection between the two USB classes CDC and HID and four types of following data transfers.

    Control Transfer
    Isochronous Transfer
    Interrupt Transfer
    Bulk Transfer

    Is it possible to implement these transfer types in both CDC and HID USB class?
    Is it possible to achieve Full Speed (12 Mbps) in both CDC and HID USB class?

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 260,190, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,437
    Helped
    13823 / 13823
    Points
    260,190
    Level
    100

    Re: Understanding the USB Protocol

    You want to read the class specification documents. CDC and HID don't use all transfer types, e.g not isochronous. CDC implies control, interrupt and bulk transfers, HID only control and interrupt.

    CDC is better suited to utilize the USB bandwidth for your application. You might also consider audio device class for isochronous transfer.



    •   AltAdvertisement

        
       

  3. #3
    Full Member level 1
    Points: 639, Level: 5

    Join Date
    Nov 2018
    Posts
    96
    Helped
    1 / 1
    Points
    639
    Level
    5

    Re: Understanding the USB Protocol

    Hi,

    I guess UART-USB bridge is USB CDC class which is limited by the data rate close to Low Speed 1.5 Mbps. Is this limitation of UART or limitation of USB CDC ? Is it possible to achieve Full Speed (12 Mbps) in both CDC and HID USB class with appropriate type of transfer ? i.e., CDC for control, interrupt and bulk transfers, while HID only for control and interrupt.



    •   AltAdvertisement

        
       

  4. #4
    Super Moderator
    Points: 260,190, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,437
    Helped
    13823 / 13823
    Points
    260,190
    Level
    100

    Re: Understanding the USB Protocol

    12 Mbps is the physical bit rate and always used in FS link, no matter what the transported payload is. You are looking for the net throughput which depends also on packet size and protocol overhead as well as latency generated by the host and device protocol stack.

    As already said, CDC can achieve a fair utilization of the USB bandwidth if configured appropriately. Throughput of UART bridges is of course limited by the Baud rate, but that has nothing to do with USB or CDC speed. Most UART bridges on the market are no using CDC but an OEM USB class driver. But it's possible to operate a simple CDC device using the built-in Windows driver usbser.sys. You can e.g. review the Microchip example "Device - CDC - Basic Demo".



--[[ ]]--