2025-11-06 7:05 PM - edited 2025-11-06 7:07 PM
Hello,
I’m developing a USB composite device on STM32 that combines RNDIS and CDC interfaces.
The device works perfectly the first time it’s connected to a Windows 10 PC — both RNDIS and CDC functions operate normally.
However, after I reset the MCU or power-cycle the board, Windows shows the following error in Device Manager:
“This device cannot start. (Code 10)”
{Operation failed} The requested operation was unsuccessful.
At this point, the RNDIS interface no longer works.
If I uninstall the device from Device Manager or reinstall the driver, it starts working again.
On Linux, the same device works without any issue, even after multiple resets.
I have confirmed the following:
The USB VID/PID remain the same after reset.
The device descriptors are correctly reported.
The problem occurs only on Windows after a full power cycle or hardware reset.
Has anyone experienced similar behavior with RNDIS composite devices on STM32?
Is there something specific I should check in the USB descriptors or RNDIS initialization sequence to prevent this Code 10 issue after reset?
Any suggestions or known workarounds would be greatly appreciated.
Thanks in advance,
2025-11-08 4:33 PM
Code 10 means that the Windows device driver started initializing the device but failed. Windows 11 provides better diagnostics, try it. See available details in the device manager, see the windows log files (setupapi_dev.log)
2025-11-10 10:52 PM
"But why does it work the first time, fail after a reset, and then work again only after I uninstall the device from Device Manager and reconnect it?"
2025-11-11 2:25 PM
Doesn't it work without uninstall? If you just unplug the device (with power-cycling it) and connect again?
2025-11-11 5:01 PM
It doesn’t work Error Code 10 is shown in Device Manager. It’s the same even if I reconnect the device.
If I remove the device from Device Manager and try again, it works. However, the issue repeats when I reset or reconnect the device.
Thank you for your reply.
2025-11-11 5:03 PM
2025-11-11 7:36 PM
Aha. Windows can cache some USB descriptors read from the device, so this can mean a problem with reading descriptors, together with timing problems.
Use USB sniffer to see exchanges between host and device. Use debug prints in the firmware to see enumeration progress and requests for descriptors.
Run USB device compatibility tests: (unfortunately this is easier to say than to do, esp. without access to the tools)
* USB-IF protocol test. Maybe electrical test too
* Microsoft MUTT