2025-02-03 03:06 AM
Hello,
we are developing a device with STM32F765VIHx.
We are experiencing a big issue with USB (USB-Device Full-Speed), when connected to a Windows PC.
The USB is configured to be a Virtual ComPort.
Windows sometimes recognizes the device, sometimes the process fails (in device descriptor phase).
We tried several ways to fix the issue (like detecting when the devices goes into USBD_STATE_SUSPENDED mode, de-init and re-initing the USB...sometimes this works, most of the times it doesn't).
Note: the problem never occurs when connected to Ubuntu.
Since we were using SMT32Cube FW_F7 V.1.17.0, we tried to move to V.1.17.2, hoping that might solve the problem.
Alas, after updating the firmware, Windows doesn't recognizes the device at all:
- the PC doens't make any sound at all when the device is plugged in
- the Device Manager tree flashes but nothing new is added
Nota again: The same device, if connected to Ubuntu, is correctly recognized as a /dev/ttyACMx port.
What's wrong with V.1.17.2?
Thanks
Alessandro
2025-02-03 03:13 AM
Hi,
>What's wrong with V.1.17.2?
..nothing ? I would ask : What's wrong with Win ? or the PC /USB port, you running Win ?
Did you try with another Win - Laptop /PC (+ other Win version) to verify the origin of the problem ?
2025-02-03 03:42 AM
Hello @mansut ,
Try uninstalling STM32 ST-LINK Utility, then reinstalling it with the device driver.
Maybe you have Windows issues with USB devices that do not occur on other operating systems like Ubuntu.
Check these posts that may help you:
Solved: USB CDC Problems on windows 10 - STMicroelectronics Community
Solved: Possible STM32 USB Virtual Com Port driver bug on ... - STMicroelectronics Community
2025-02-03 04:06 AM
Thanks for your reply.
Yes, we tried with different PCs, both with Windows 10 and 11. Same random problem occurs.
2025-02-03 04:50 AM
> Try uninstalling STM32 ST-LINK Utility, then reinstalling it with the device driver.
> Maybe you have Windows issues with USB devices that do not occur on other operating systems like Ubuntu.
As I understand it, the ST-Link is not what the OP talks about, but an USB port driven by his application.
But I suppose he can clarify this point.
And second, he might clarify if we talk about a ST Nucleo board of some kind, or a custom board.
Such information is occasionally crucial.
2025-02-03 04:57 AM
> Alas, after updating the firmware, Windows doesn't recognizes the device at all:
> - the PC doens't make any sound at all when the device is plugged in
> - the Device Manager tree flashes but nothing new is added
Sounds are generally irrelevent in this context.
Check the complete USB device tree (or better the complete device tree). Often, an "unknown device" shows up, for which Windows cannot assign or install drivers automatically.
Additionally, manually installed drivers are usually assigned to hubs. If a PC/Notebook contains several hubs of different kind (with different kernel drivers), you might need to install the driver a second time.
A good example are USB port on the front and those on the back of a desktop, which are usually connected through different hubs.
And as stated below, please clarify if you talk about a Nucleo board or a custom board here, and if you mean the ST-Link USB or something else (application-driven USB).
2025-02-03 08:33 AM
Hello, thanks for the reply.
As you already guessed, the USB is driven by our application (running FreeRTOS), and we are using a custom board.
About the Windows device tree, no new element is added after the device with FW 1.17.2 is plugged in. The tree closes and reopens, but I checked every branch and there is no difference at all among the two.
I also checked with usbview.exe, and it doesn't show any difference when i plug in the device.
I also tried FW 1.17.2 adding the lines releated to CDC_SET_LINE_CODING and CDC_GET_LINE_CODING, as suggested by other solutions, but the behaviour does not change.
2025-02-03 02:19 PM
Try to connect your device thru a good powered hub.
2025-02-03 10:51 PM
I'm far from being an expert in USB matters, but it sounds like an ID issue.
Every USB device is supposed to have a proper vendor, product and revicion code number.
> I also checked with usbview.exe, and it doesn't show any difference when i plug in the device.
I'm not sure how that works in Windows...
I prefer Linux, and would use lsusb for that. A command which lists all USB devices found, regardless if they have kernel driver support or not.
2025-02-03 11:59 PM
We tried, the problem persists.