Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Understanding the USB Protocol

joniengr

Full Member level 3
Joined
Nov 3, 2018
Messages
164
Helped
1
Reputation
2
Reaction score
1
Trophy points
18
Activity points
1,492
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?
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
46,758
Helped
13,880
Reputation
28,008
Reaction score
12,519
Trophy points
1,393
Location
Bochum, Germany
Activity points
272,893
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.
 

joniengr

Full Member level 3
Joined
Nov 3, 2018
Messages
164
Helped
1
Reputation
2
Reaction score
1
Trophy points
18
Activity points
1,492
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.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
46,758
Helped
13,880
Reputation
28,008
Reaction score
12,519
Trophy points
1,393
Location
Bochum, Germany
Activity points
272,893
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".
 

Toggle Sidebar

Part and Inventory Search


Welcome to EDABoard.com

Sponsor

Sponsor

Design Fast


×
Top