2025-11-26 10:43 PM
Hello everyone.
I am using an F411 and I cannot figure out how this is supposed to work.
I enabled USB_Device in middleware, enabled USB_OTG_FS, and set up line encodings based on the default STM32 example, but when I flash STM (or step through with the debugger) I run into an error during the initialization that says "The last USB device you connected to this computer malfunctioned, and Windows does not recognize it." Apparently this means I am not enumerating.
I went through other posts on this forum. I made sure interrupts were enabled, that the clock is exactly 48 Hz, and I allocated extra space on the heap and the stack.
Here is a picture of my clock.
Here is my USB schematic.
What does this mean? How can I even go about fixing this?
Thanks
2025-11-27 4:25 AM
Hi @Sandman2
Is your device bus powered?
Here is a reference design example :
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-11-27 6:47 AM
Yes, I am powering my STM through the same USB connection I'd like to write data out of. I know this is correlated with VBus, but the actual Vbus pin on PA9 isn't connected on my physical PCB so I didn't think I needed it.
2025-11-27 7:33 AM
Short BOOT0 to VDD and reset the chip. Is the USB DFU bootloader recognized? If so, hardware is fine and the problem is in software. Try getting an example project up and running.
2025-11-27 7:51 AM
2025-11-27 10:02 AM
Yes, you are missing one obvious thing: at least according to the schematic there is no connection between the USB-C connector data lines and MCU's USB data lines.
Also, if you use breakpoints and single-stepping during USB enumeration, the enumeration process will fail.
You don't need VBUS sensing but if not connected, it must be disabled in USB peripheral settings.
2025-11-27 10:43 AM
I don't see how you can debug hardware without access to that hardware.
Schematic is fine, should work, but clearly something is wrong. That is one way to start the debugging process to identify the issue.