A quickie on USB Endpoints

Endpoints are essentially the USB addresses that USB data is sent to or from. Now, here is the trick. The transfer direction naming convention is a bit unintuitive.

Contrary to — at least — what I imagined, an IN Endpoint will transfer USB data from the USB device to the host PC, while an OUT Endpoint will transfer USB data from the host PC to the USB device. Basically this means that the data transfer direction naming convention is relative to the host and not to the device.

Another USB rule is that an IN endpoint has an odd address while an OUT uses an even address.

The number of endpoints is largely defined by the device class chosen. A user may add additional endpoints, but this would then start to move the overall design to require dedicated drivers on the host. All designs will include a control endpoint for configuration and control. This will be typically endpoint 0 (zero). The transfer mode will be largely defined by the device class selected also. See this in FTDI documentation:

  • A device that uses isochronous transfers has no error checking, but will send regular sized chunks at regular intervals. Applications such as audio may be suited to this.
  • A device that uses interrupt transfers will be receiving data at unspecified intervals, such as Human Interface Devices (HID). This may include mouse and keyboard interfaces.
  • The third main transfer type is bulk mode transfer. This is used for transferring large blocks of data and includes error checking.

We’ll get back on this. Definitely.

Filed in Electronics and tagged , , , .

Leave a Reply

Your email address will not be published. Required fields are marked *