TheKikGen / stm32-tkg-hid-bootloader

A HID driverless bootloader and flash tool companion for the STM32F1 line
38 stars 12 forks source link

CH32 devices? #8

Open MickGyver opened 3 years ago

MickGyver commented 3 years ago

Can anything be done to make CH32F103C8T6 devices work? I have tried several bootloaders but have only managed to get Roger Clarke's bootloader to work, the other ones, including this one gives the error "device descriptor request failed". HID device firmware also works fine, device is detected properly in Windows 10.

TheKikGen commented 3 years ago

Hi. This is probably not linked with software but with hardware. CH32 are clones of STM32.... Did you check USB resistors ? Did you check on several computer ? Are you using a "Bluepill" ?

MickGyver commented 3 years ago

Thanks for the reply! The USB resistor is 1.5K. Some HID joystick code I tested works fine on the board when uploaded using ST-Link, the bootloader by Roger Clark (stm32duino) also works fine, but I don't want to use that since it requires drivers.

TheKikGen commented 3 years ago

If you are able to, you could increase waiting time in the firmware here : https://github.com/TheKikGen/stm32-tkg-hid-bootloader/blob/f403c39b88b0ca438e243d821b475cf1c31bf38f/F1/Src/main.c#L101

SLEEP_M(1); => SLEEP_M(100)

MickGyver commented 3 years ago

Thanks for the help, I just tried it but alas, the problem remains.