USB Component  Version 6.17.0
MDK Middleware for USB Device and Host Communication
Endpoint Descriptor

The Endpoint Descriptor (USB_ENDPOINT_DESCRIPTOR) specifies the transfer type, direction, polling interval, and maximum packet size for each endpoint. Endpoint 0 (zero), the default endpoint, is always assumed to be a control endpoint and never has a descriptor.

Offset Field Type Size Value Description
0 bLength uint8_t 1 Number Size of this descriptor in bytes.
1 bDescriptorType uint8_t 1 Constant Endpoint Descriptor Type = 5.
2 bEndpointAddress uint8_t 1 Endpoint The address of the endpoint on the USB device described by this descriptor. The address is encoded as follows:
  • Bit 3...0: The endpoint number
  • Bit 6...4: Reserved, reset to zero
  • Bit 7: Direction, ignored for control endpoints.
    • 0 = OUT endpoint
    • 1 = IN endpoint
3 bmAttributes uint8_t 1 Bitmap

The endpoint attribute when configured through bConfigurationValue.

  • Bits 1..0: Transfer Type
    • 00 = Control
    • 01 = Isochronous
    • 10 = Bulk
    • 11 = Interrupt

For non-isochronous endpoints, bits 5..2 must be set to zero. For isochronous endpoints, they are defined as:

  • Bits 3..2: Synchronization Type
    • 00 = No Synchronization
    • 01 = Asynchronous
    • 10 = Adaptive
    • 11 = Synchronous
  • Bits 5..4: Usage Type
    • 00 = Data
    • 01 = Feedback
    • 10 = Implicit feedback
    • 11 = Reserved

All other bits are reserved and must be reset to zero.

4 wMaxPacketSize uint16_t 2 Number

Is the maximum packet size of this endpoint. For isochronous endpoints, this value is used to reserve the time on the bus, required for the per-(micro)frame data payloads.

  • Bits 10..0 = max. packet size (in bytes).

For high-speed isochronous and interrupt endpoints:

  • Bits 12..11 = number of additional transaction opportunities per micro-frame:
    • 00 = None (1 transaction per micro-frame)
    • 01 = 1 additional (2 per micro-frame)
    • 10 = 2 additional (3 per micro-frame)
    • 11 = Reserved
  • Bits 15..13 are reserved and must be set to zero.
6 bInterval uint8_t 1 Number

Interval for polling endpoint for data transfers. Expressed in frames or micro-frames depending on the operating speed (1ms, or 125μs units).

  • For full-/high-speed isochronous endpoints, this value must be in the range from 1 to 16. The bInterval value is used as the exponent for a 2bInterval-1 value; For example, a bInterval of 4 means a period of 8 (24-1).
  • For full-/low-speed interrupt endpoints, the value of this field may be from 1 to 255.
  • For high-speed interrupt endpoints, the bInterval value is used as the exponent for a 2bInterval-1 value; For Example, a bInterval of 4 means a period of 8 (24-1). This value must be from 1 to 16.
  • For high-speed bulk/control OUT endpoints, the bInterval must specify the maximum NAK rate of the endpoint. A value of 0 indicates the endpoint never NAKs. Other values indicate at most 1 NAK each bInterval number of microframes. This value must be in the range from 0 to 255.