当前位置 博文首页 > dadalaohua的博客:【USB描述符系列】一个CP210x的USB转串口

    dadalaohua的博客:【USB描述符系列】一个CP210x的USB转串口

    作者:[db:作者] 时间:2021-07-27 08:48

    【USB描述符系列】一个CP210x的USB转串口

    简介

    看了下手头的一个CP210x芯片的USB转串口模块的USB描述符有没有什么差异。从描述符上看,和其他USB转UART的模块的USB描述符都差不多,都是厂商自定义类Vendor specific class,在很多系统上都没法免驱。这个模块是一个Full Speed设备,传输数据使用bulk传输,具体的可以看USB描述符信息。

    下面是这个Silicon Labs CP210x USB to UART Bridge的USB描述符。

    Device Descriptor

    OffsetFieldSizeValueDescription
    0bLength112hSize of this descriptor
    1bDescriptorType101hDevice
    2bcdUSB20110hUSB Spec 1.1
    4bDeviceClass100hClass info in Ifc Descriptors
    5bDeviceSubClass100hUnused
    6bDeviceProtocol100hUnused
    7bMaxPacketSize0108h8 bytes
    8idVendor210C4hVendor ID:Cygnal Integrated Products, Inc.
    10idProduct2EA60hProduct ID
    12bcdDevice20100h1.00
    14iManufacturer101hIndex to string descriptor that contains the string < Your Name > in Unicode
    15iProduct102hIndex to string descriptor that contains the string < Your Product Name > in Unicode
    16iSerialNumber103hIndex to string descriptor that contains the string < Your Serial Number > in Unicode
    17bNumConfigurations101hOne configuration

    Configuration Descriptor

    OffsetFieldSizeValueDescription
    0bLength109hSize of this descriptor
    1bDescriptorType102hConfiguration
    2wTotalLength20020hLength of the total configuration block, including this descriptor, in bytes
    4bNumInterfaces101hOne interfaces
    5bConfigurationValue101hID of this configuration
    6iConfiguration100hUnused
    7bmAttributes180hBus Powered
    4…0: Reserved. . . 00000Unused
    5: Remote Wakeup. .0 . . . . .No
    6: Self Powered. 0 . . . . . .No, Bus Powered
    7: Reserved (set to one)
    (bus-powered for 1.0)
    1 . . . . . . .Unused
    8bMaxPower132h100 mA

    Interface Descriptor 0/0 Vendor-Specific, 2 Endpoints

    OffsetFieldSizeValueDescription
    0bLength109hSize of this descriptor
    1bDescriptorType104hINTERFACE
    2bInterfaceNumber100hIndex of this interface
    3bAlternateSetting100hIndex of this setting
    4bNumEndpoints102h2 endpoints
    5bInterfaceClass1FFhVendor-Specific
    6bInterfaceSubClass100hVendor-Specific
    7bInterfaceProtocol100hVendor-Specific
    8iInterface102hIndex of string descriptor describing this interface

    Endpoint Descriptor 81 1 In, Bulk, 64 bytes

    OffsetFieldSizeValueDescription
    0bLength107hSize of this descriptor
    1bDescriptorType105hEndpoint
    2bEndpointAddress181h1 In
    3bmAttributes102hBulk
    1…0: Transfer Type. . . . . .10Bulk
    7…2: Reserved000000 . .Unused
    4wMaxPacketSize20040h64 bytes
    6bInterval100hUnused

    Endpoint Descriptor 01 1 Out, Bulk, 64 bytes

    OffsetFieldSizeValueDescription
    0bLength107hSize of this descriptor
    1bDescriptorType105hEndpoint
    2bEndpointAddress102h2 Out
    3bmAttributes102hBulk
    1…0: Transfer Type. . . . . .10Bulk
    7…2: Reserved000000 . .Unused
    4wMaxPacketSize20040h64 bytes
    6bInterval100hUnused

    本文链接:https://blog.csdn.net/u012028275/article/details/115593403

    cs