STM32 USB CDC Example and Windows 10

Sysprogs forums Forums VisualGDB STM32 USB CDC Example and Windows 10

This topic contains 1 reply, has 2 voices, and was last updated by  support 3 weeks, 4 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #32581

    face68
    Participant

    I try to run the STM32 USB Example und changed the USB-Type to CDC.

    Under Windows 10, there is an issue.
    The device will shown as “STM32 Virtual ComPort in FS Mode” under Other devices
    and as “Serial USB-Device” under Ports, which is not correct.
    Both devices can´t find the right driver.

    For Windows versions below 10, you can install the STM32 Virtual COM Port Driver.
    For Windows 10, you should use the Microsoft inbox driver.

    To get the Microsoft driver working, you must change the values bDeviceClass and the bDeviceSubClass from 0x00 to 0x02.
    The value can be found in the usbd_desc.c in function __ALIGN_BEGIN uint8_t USBD_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END near line 74

    After the change is made, the CDC will shown as Serial USB-Device under Ports with a working driver.

    Hope this will help someone which has the same problem.
    Best regards!

    Attachments:
    You must be logged in to view attached files.
    #32584

    support
    Keymaster

    Hi,

    Thanks for pointing this out. The VisualGDB’s COM port sample is actually derived from the corresponding STM32 SDK sample (CDC_Standalone) for each device family.

    We have rechecked the original SDKs and it looks like ST has updated the class/subclass values for some devices in the latest SDK, while left the old values for others.

    We have updated our STM32 BSP generator to use the new values and confirmed that they work out-of-the-box on Windows 10 21H1. This fix will be included in the next release of the STM32 BSP, until then feel free to patch the files manually, or download the patched versions from our BSP generators repository (see this commit).

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.