Serasidis / STM32_HID_Bootloader

Driverless USB HID bootloader and flashing tool for STM32F10X devices
418 stars 150 forks source link

USB device not recognized #51

Closed dmkng closed 1 year ago

dmkng commented 2 years ago

Hello, I flashed the hid_generic_pc13.bin file to my BluePill board using a serial dongle and STM32CubeProgrammer with the default start address (0x08000000) and also the start address specified in README (0x8000000). When plugging in the board via USB the LED doesn't blink or anything, and after 1 second I'm getting a Windows notification "USB device not recognized". Of course I can't flash anything using Arduino IDE because hid-flash can't find any HID device. It is not the board's fault because STM32duino bootloader works perfectly, LED flashes when plugged in after flashing via serial dongle and I can successfully flash sketches via USB. What can be the problem? Please help. Thanks.

bance commented 2 years ago

same fault here with 2.2.1 and 2.2.2

bootloader flashed with st-link v2. verified ok.

dmkng commented 2 years ago

I discovered what's wrong. Typical Blue Pill board uses STM32F103C6T6 (32MB RAM, 10MB Flash) but this bootloader supports only STM32F103C8T6 (64MB RAM, 20MB Flash), I created a fork where I roughly fixed this issue creating new target "bluepill" but I think that it can be fixed in some better way than what I did. Here's my fork: https://github.com/dmkng/STM32_HID_Bootloader

bance commented 2 years ago

thank you for the solution, dmkng!

Istria1704 commented 2 years ago

Thank you! I had the identical problem. USB Device not recognized/malfunctioned. Also with a cheap aliexpress STM32F103C6T6 board. After a couple of hours of searching around and experimenting, it turned out to be this.

Can conform the @dmkng fork is the fix for STM32F103C6T6 boards.

Thanks a lot!