2025-12-19 1:16 PM
I created a custom STM32F411 PCB. I can program it and blink a LED for example just fine. I also have a STM32 blackpill board which uses the same MCU. When I run some USB HID code it works fine on the blackpill but once uploaded to my custom PCB and I plug it into my windows PC, it says the usb device malfunctioned and is not working. I followed all the guidelines from the datasheet for the USB design. (I dont need external pull-ups for D+, no need for VBUS sensing). Also I have a 25Mhz HSE clock that is properly configured for the precise 48Mhz USB clock even though its only running at FS. Any ideas to why this might be happening?
2025-12-19 1:24 PM
Nothing wrong with what is shown as far as I can see.
If the same code works on equivalent hardware, the problem is likely not the code.
For an UFQFPN48, I immediately question solderability. Was the part loaded correctly? Is the pad connected to GND? Faulty solder connections?
Reset it with BOOT0 held high and BOOT1 held low. does the USB DFU bootloader start? If not, there's a problem with the hardware.
2025-12-25 5:35 AM
Hi @PeppersONLY
Indeed, as mentioned @TDK UFQFPN48 is a fine-pitch package and can be tricky to solder.
If still cannot connect to DFU bootloader, you need to analyze your clock configuration and review your USB line routing
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.