What are Endpoints in USB?


What are Endpoints? 


The mechanisms used for USB communication are data buffers called Endpoints and used for data transfers.
  • Endpoints are unidirectional which means it can carry data into only one direction(except control endpoint), either from the host to device and vice versa 
  • In USB terminology, the direction of an endpoint ( and transfers to or from them) is based on the host. Thus, IN always refers to transfers to the host from a device and OUT always refers to transfers from the host to a device. USB devices can also support bi-directional transfers of control data 
  • Endpoint 0 is reserved in every devices for control purposes and used in enumeration process to get information of device, configuration, interface and endpoint descriptors

Following are four types of USB Endpoints: 
  1. CONTROL
  2. INTERRUPT
  3. BULK 
  4. ISOCHRONOUS 
CONTROL 
  • Small in size 
  • Used to allow access different parts of the USB devices 
  • Used for configuring device, retrieving information of device, sending commands to device or retrieving status reports from the device 
  • Every device has a control endpoint called "endpoint 0" as described above 
INTERRUPT 
  • Transfers small amounts of data 
  • Used in USB keyboards and mice 
  • Not generally used to transfer large amounts of data 
  • Transfers are guaranteed by the USB protocol to always have enough reserved bandwidth to make it through 
BULK 
  • Transfer large amounts of data 
  • Used for devices that need to transfer any data that must get through with no data loss such as printer, storage devices, network devices etc. 
  • Transfers are not guaranteed by the USB protocol to always make it through in a specific amount of time. If not enough room on bus then whole packet is split up across multiple transfers
ISOCHRONOUS
  • Also transfers large amounts of data but the data is not always guaranteed to make it through 
  • Used in devices that can handle loss of data such as audio video devices 
Control and bulk endpoints are used for asynchronous data transfers, whenever the driver decides to use them. Interrupt and isochronous endpoints are periodic. This means that these endpoints are set up to transfer data at fixed times continuously, which causes their bandwidth to be reserved by the USB core.

References:

Comments

Popular posts from this blog

MBR partitioning with 'parted' utility

Replace default splash screen in Yocto

Disk Partitioning: MBR vs GPT